[Vuejs]-Vue- How can I control the behavior of chips in v-autocomplete?

1👍

Instead of including "Select All" in the array of names, you can use the prepend-item slot to include a separate Select All checkbox.

If you need to differentiate between names selected via individual click and those selected via the Select All checkbox you will probably need a new property in the names array to track that, say a boolean that is true if selected one way and false the other.

You’ll also need a slot like selection to customize the display of your chips where you can use v-if to conditionally render a chip based on that new boolean property.

This codesandbox I believe is pretty close to what you’re after

👤yoduh

Leave a comment