I'd like to prevent the search field from clearing. Is there any clean way to do it? I think I could listen to events and restore the state manually, but it feels a bit hacky to me.
Sadly it is not possible at the moment. The search value (which is the input value) is set to the currently set option.
That would require some tweaking with creating a temporary search value that gets restored after opening the dropdown.
Feel free to prepare a PR with this if it鈥檚 urgent.
That would be nice to have. But I think, doing type-ahead would require a whole lot of remodeling.
1) Type-ahead should return string, while options could be an array of strings or objects.
2) Typed text should persist at all times.
3) For type-ahead it makes sense to separate options list from input.
That's not the case for vue-multiselect at the moment.
Might be worth to make another library. BTW, there is one. Not sure about its quality or usefulness though.
There will be a new prop preserveSearch that preserves the search query through opening/closing the select. Will be available in the next release.
Useful option, however the search is not preserved after selection, is there a way to do that ?
Most helpful comment
There will be a new prop
preserveSearchthat preserves the search query through opening/closing the select. Will be available in the next release.