Trying to call two functions with @click #7504
Answered
by
LinusBorg
einz-loggik
asked this question in
Help/Questions
-
I am using Nuxt and Vuetify with my project so i am not shure if the Vue discussion channel is correct but i think my question is related to Vue. I have an item group where i try to toggle an item on @click and then also call another function to run additional code. After adding the second function the toggle doesn't work anymore and i don't understand why. Maybe someone can explain to me why it isn't working and how to fix it. Here is the code i have so far <template>
<v-item-group selected-class="is-selected">
<v-container>
<v-row>
<v-spacer></v-spacer>
<v-col v-for="color in colors" cols="10" sm="2">
<v-item v-slot="{ isSelected, selectedClass, toggle }">
<v-card
:class="['d-flex align-center', selectedClass, color]"
@click="[toggle, doSomethingWithColor(color)]"
>
</v-card>
</v-item>
</v-col>
<v-spacer></v-spacer>
</v-row>
</v-container>
</v-item-group>
</template> |
Beta Was this translation helpful? Give feedback.
Answered by
LinusBorg
Jan 13, 2023
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
einz-loggik
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@click="(event) => { toggle(event); doSomethingWithColor(color) }"