In my Vue component, there are 5 distinct values stored in the options
variable. I want users to select only one value from each of the 5 select options I provide. This means that once a user selects a value in one input select
component, that same value cannot be chosen in any of the other components.
For example:
input one: [ orange, green, yellow, black, blue ]
input two: [ orange, green, yellow, black, blue ]
input three: [ orange, green, yellow, black, blue ]
input four: [ orange, green, yellow, black, blue ]
input five: [ orange, green, yellow, black, blue ]
If a user selects "orange" in input one, they cannot select "orange" again in inputs 2 through 5.
I have attempted to address this by creating arrays to track selected items and available items, but I am struggling to find a solution.
How can I resolve this issue in Vue 3
?