1๐
โ
I would prefer to keep things short and simple as much as possible
<v-checkbox
:value="item.selected_values.length === item.filter_values.length"
@change="item.selected_values = $event ? item.filter_values : []">
</v-checkbox>
item.selected_values = $event ? item.filter_values : []
This will set selected_values
to filter_values
for select all and []
for deselect all based all checkbox value ($event
).
item.selected_values.length === item.filter_values.length
This will make the checkbox value recompute when selected_values
changed.
๐คUser 28
Source:stackexchange.com