No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Expansion item: How to handle expand click as well as custom button

    Framework
    2
    3
    1497
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Y
      yananas last edited by

      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
      

      fcc7e02a-cb48-4aaa-961f-910981b15651-image.png

      beets 1 Reply Last reply Reply Quote 0
      • beets
        beets @yananas last edited by

        @yananas Try:

        <q-btn @click.stop flat color="primary" icon="more_vert">
          <q-menu>
            This is a QMenu
          </q-menu>
        </q-btn>
        
        1 Reply Last reply Reply Quote 0
        • Y
          yananas last edited by

          Worked, thank you!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post