How to do a link and close the popover

  • 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 item to="/company" @click="$refs.popover.close()">
        <q-item-main label="Company" />


    Lucas Simon

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

            <q-popover ref="popover">
                    <q-item @click="$router.push('/settings'); $refs.popover.close()">
                        <q-item-side icon="settings" />
                        <q-item-main label="Settings" sublabel="" />
                    <q-item @click="$router.push('/orders'); $refs.popover.close()">
                        <q-item-side icon="receipt" />
                        <q-item-main label="Orders" sublabel="" />

  • Admin

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

Log in to reply