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

    How to do a link and close the popover

    Framework
    3
    3
    1167
    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.
    • L
      lucassrod last edited by

      Hi, guys!

      How can I close my popover when I do a click? Or are there another code that I can use to do a dropdown menu on qbtn component?

      <q-item @click="$router.push('/preferences'), $refs.popover.close()">
          <q-item-main label="Preferences" />
      </q-item>
      
      <q-item item to="/company" @click="$refs.popover.close()">
          <q-item-main label="Company" />
      </q-item>
      

      Regards,

      Lucas Simon

      A 1 Reply Last reply Reply Quote 0
      • A
        april @lucassrod last edited by

        @lucassrod I came across a similar problem. Here’s my code

        <q-btn>MENU
                <q-popover ref="popover">
                    <q-list>
                        <q-item @click="$router.push('/settings'); $refs.popover.close()">
                            <q-item-side icon="settings" />
                            <q-item-main label="Settings" sublabel="" />
                        </q-item>
                        <q-item @click="$router.push('/orders'); $refs.popover.close()">
                            <q-item-side icon="receipt" />
                            <q-item-main label="Orders" sublabel="" />
                        </q-item>
                    </q-list>
                </q-popover>
            </q-btn>
        
        1 Reply Last reply Reply Quote 0
        • rstoenescu
          rstoenescu Admin last edited by

          $refs.popover.close(() => $router.push('/settings'))

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