Open WebFreak001 opened 2 years ago
(made an issue in FAST: https://github.com/microsoft/fast/issues/5583)
Thanks for the issue and for filing an issue with FAST as well! I'll keep an eye on the progress and merge any changes the FAST team adds once they are available!
any work being done on this one? I just came across this issue today using the latest webview-ui-toolkit version
Unfortunately, no work on our end since this is an upstream issue within FAST
I've been checking the issue that @WebFreak001 filed with FAST every month or so for the last year but still haven't seen any movement on it
That's pretty funny. I found a workaround via overriding component so it worked out in the end. Thank you again
Oh nice! Glad you were able to get yourself unblocked in that case 😁
That's pretty funny. I found a workaround via overriding component so it worked out in the end. Thank you again
Hi, what was your workaround?
Describe the bug
When generating vscode-option elements inside a vscode-dropdown and setting
.selected = true;
on one, it should be selected in the UI, but isn't (reset by an internal reset if no values are selected check)To reproduce
Expected behavior
Value 2 should be selected in the example, not Value 1
Desktop (please complete the following information):
v0.9.0
Additional context
There is an internal check ran asynchronously, which resets the value if no option is selected. However it checks if the option is selected by checking if the attribute selected is set. (not the property)
The
selected
property of vscode-option should probably modify the DOM attribute.It seems to be reset here:
https://github.com/microsoft/fast/blob/eff36b2834b7709cc2281738007019fd264c3d31/packages/web-components/fast-foundation/src/listbox/listbox.ts#L537
alternatively it would be possible to also check the property instead of making the property modify the attribute, which is what combobox does:
https://github.com/microsoft/fast/blob/256fe07122c2838e6bf0edd639a539b9ceeaa1bf/packages/web-components/fast-foundation/src/combobox/combobox.ts#L546