Chips from data source
I’d like to use chips but possible values should be from a data source.
I thought of using an autocomplete and @selected would trigger chip’s add() method. But this would not keep user from typing anything else… Using disabled chips is not a solution since user would not have the possibility of removing a chip.
Any ideas? thanks
Have you found a solution. I’d be interested to learn.
I’m doing something similar. In the autocomplete search() I’m adding to the top of the result list the current search term and on selected() I’m adding to an array that I “v-for” on to display chips. Chips can be made closable with the “closable” attribute. The only thing I’m missing is when the chip’s @close event is called, I want to remove the chip from the array.
Except the @close event doesn’t send anything that would enable me to find the chip that the user wants to close.
Edit: OK found how to get @close to work: pass the chip as a parameter to my method call.