I have a parent Parent.vue that feeds the same list
[{key: "one", selected: false], {key: "two", selected: false}, {key: "three", selected: false]
to multiple components one the same page. None of the items in the list can be selected twice.
What I have tried:
So my parent creates a Child.vue component and passes in this list. Child.vue props accepts it then populates the :items fields of the <v-select>
. As a result we see all 3 items. I select "two". I bind to change event so I $emit to parent the key ("two") and the flag (selected: true) so the parent filters out the list so there is only "one" and "three" now. If I were to add another component at this point - all fine - it would only have "one" and "three" to select from. My problem is that when I select this "two" item - it disappears. Primarily because the parent takes this item out. But... how to I make it so it either stays (indicating that this item have been selected) and other components are not able to select it no more? Can I possible disable just this "two" item for selection (in case other components try to select it - they can't).
I can do it easily with plain HTML and JS - with Vue / Vuetify - how can I accomplish that?