0👍
You don’t need to use refs
for this.
You can use reactive properties to achieve this.
Should declare a isLoading
variable inside your realEstates
objects and add this to data
so it’s reactive.
Then you can use it directly on the button
<v-btn :ref="'webflow_publish_btn_'+realestate.id" @click="$emit('webflow-publish',realestate.id)" color="green" :loading="realEstates[id].loading">Publikovať aktuálnu verziu</v-btn>
Notice the :
before loading
.
And then update the value from your axios call.
realEstates[id].loading = true
Source:stackexchange.com