Closed stefan-ernst closed 1 year ago
Hi, thanks for reporting the issue. Maybe its related to #189
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.
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 solid-select
the user provide all options and you filter internally, right ?
In Kobalte's Combobox
it's the user responsibility to give a list of filtered options, so I don't have access to all.
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
In
solid-select
the user provide all options and you filter internally, right ?
No. In solid-select the options are reactive and so filtering happens outside. I just also provide a handy helper (createOptions
) for that.
Fixed in v0.10.0
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):