Just started using vuetify and exploring the <v-btn-toggle>
component for the first time.
I'm trying to implement a toggle feature to filter my user list based on employee, manager, or admin types...
Check out a snippet of my code below:
<v-btn-toggle
v-model="toggle_user"
multiple
>
<v-btn :value="employee">
Employees
</v-btn>
<v-btn :value="manager">
Managers
</v-btn>
<v-btn :value="admin">
Admins
</v-btn>
</v-btn-toggle>
data() {
return {
toggle_user: 1,
}
},
To display the result on the page, I used:
<p>{{toggle_user}}</p>
and it correctly displays an array based on selected values...
However, every time I click one of the buttons, I encounter the following error:
Property or method ["employee" or "manager" or "admin"] is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property.
Can you spot what's wrong with my code?
Your help would be greatly appreciated! Have a wonderful day!