0๐
โ
i solve it by writing a function to add category.id into form.categories :
addCategory (id) {
if(!this.form.categories.includes(id))
this.form.categories.push(id);
else
this.form.categories.splice(this.form.categories.indexOf(id), 1);
this.search()
}
i call it in checkbox @change
Source:stackexchange.com