Closed jckw closed 3 years ago
With very little knowledge about Svelte or this library, I would guess that it's because the placeholder is set (and the input is marked as disabled) on the first render but not in the function called onMount here:
Hi @jckw ! I have this solved in the latest release. Thank you so much for flagging!
I've been using the figsvelte starter and have been trying to update the options in the SelectMenu dynamically.
i.e., on load, I send a message to the UI which is received via:
The message is sent and received properly, however, because I removed the initial menuItems, the component render with "There are no items to select."
Replacing the initialisation of menuItems with:
Then the update works perfectly and the dummy item is replaced with the actual data, so it looks like initialising a MenuItem with no items disables updates which was unexpected.
Pretty sure this is a bug, unless there's a different way to update array menus with dynamic data!