-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combobox values derived from options leads to edge cases #217
Comments
Hi, thanks for reporting the issue. |
Hi, yes I think it goes a bit further than that as the selected option will then also replace the existing values array. If you want I can try to submit a PR for this, I think the values and option lists need to be separated. I'm not too familiar with solid yet but I can give it a try |
Yes, my problem is that both selected values and options are the same objects. I haven't found a solution to have a "copy" of the option when you select it so it will be independent of the combobox options. |
Do you need to copy the option itself? In solid-select I use lists for the value and options so you can share the same object but still manage separately. |
In In Kobalte's |
We could pass in the list of the selected values as well, or have that as an option when the multiple prop is set to true? Would not be as ergonomic but reduce the internal complexity |
No. In solid-select the options are reactive and so filtering happens outside. I just also provide a handy helper ( |
Fixed in |
Describe the bug
When trying to control combo box options and values externally, there can be edge cases because the selected options in "multiple" mode seem to be controlled by the available options. If you filter down the options, the values which are dependent on the options disappear from the combobox.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Result filtering should have no impact on selected options
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: