Expansion item: How to handle expand click as well as custom button
-
Hi,
I have a button on the right of an expansion-item.
Currently, when I click on the button, it also triggers the expand due to event propagation.
How can I prevent the expansion item to expand when clicking the qBtn ?
Thank you!<q-expansion-item switch-toggle-side> <template #header> <q-item-section> Expand This </q-item-section> <q-item-section side> <q-btn flat color="primary" icon="more_vert"> <q-menu> This is a QMenu </q-menu> </q-btn> </q-item-section> </template> </q-expansion-item
-
@yananas Try:
<q-btn @click.stop flat color="primary" icon="more_vert"> <q-menu> This is a QMenu </q-menu> </q-btn>
-
Worked, thank you!