i have problem with vue. when i click get deposit address i activate function:
getAddress(i){
loader[i] = true;
...some other operations
}
this is how it should look: I click the "get address" button, it activates the function and sets the "loader[i]" to true, then vuetify will show the user loading animation, but it doesn't work, only when I open the next panel in v-expansion-panels with a different currency, it somehow will start and show this animation in first panel.
in template in expansion-panel module
<v-btn @click="getAddress(currency, i);" outlined :loading="loading[i]" v-
if="!currency.address" text dark>Get Deposit Address</v-btn>
in data
loading: [false, false, false, false],
VueJS cannot detect changes in your array if you’re setting/updating a value by index, as mentioned in their documentation: https://vuejs.org/v2/guide/reactivity.html#For-Arrays
So, use Vue.set or this.$set instead, ie:
this.$set(this.loader, i, true);
You passed wrong parameter to the function. It should have been
<v-btn @click="getAddress(i);"