You could do a few things
Firstly i would change your created() method to a beforeCreated() to get the data before you render the view, minor performance boost.
you could modify the data you get and add an isOpen : false attribute to each item in the array
or
you could create an array and fill it with expanded items and remove them when you click again
something along the lines of this:
// data
expanded_items : []
// methods
expand(item){
if(this.isExpanded(item))
{
this.expanded_items = this.expanded_items.filter((expanded_item) => expanded_item.id != item.id)
}else{
this.select(item);
this.expanded_items.push(item);
}
},
isExpanded(item){
return !! this.expanded_items.find((expanded_item) => expanded_item.id == item.id);
},
use the expand(item) as the @click method on the dropdown and use the isExpanded(item) to check wether to expand the dropdown or not