You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per the example below, when using the Fluent Web Components menu with the FAST when directive it renders menu open and it is non-functional (e.g. the trigger button does not toggle the menu).
On investigation, the problem is due to setComponent(), when called by connectedCallback() the if condition evals to false as both slottedMenuList and slottedTriggers are empty. As such, the popup attribute is not added to menu list.
The menu works as expected when not called from ${when}, but I assume the reason for calling Updates.enqueue(() => this.setComponent()); is to allow the template to render and for slotted to populate slottedMenuList and slottedTriggers before calling setComponent(). I'm unclear why ${when} throws it off.
Component
Menu
Package version
3.0.0-beta.74
@microsoft/fast-element version
2.0.1
Environment
Current Behavior
Per the example below, when using the Fluent Web Components menu with the FAST when directive it renders menu open and it is non-functional (e.g. the trigger button does not toggle the menu).
On investigation, the problem is due to setComponent(), when called by
connectedCallback()
the if condition evals to false as bothslottedMenuList
andslottedTriggers
are empty. As such, thepopup
attribute is not added to menu list.The menu works as expected when not called from
${when}
, but I assume the reason for calling Updates.enqueue(() => this.setComponent()); is to allow the template to render and forslotted
to populateslottedMenuList
andslottedTriggers
before callingsetComponent()
. I'm unclear why${when}
throws it off.As a workaround, I subclassed
Menu
as follows;Expected Behavior
Per above
Reproduction
https://stackblitz.com/edit/vitejs-vite-metwzeuy?file=index.html
Steps to reproduce
Please see above
Are you reporting an Accessibility issue?
None
Suggested severity
Medium - Has workaround
Products/sites affected
No response
Are you willing to submit a PR to fix?
yes
Validations
The text was updated successfully, but these errors were encountered: