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

    QDrawer persistence property

    Help
    2
    3
    247
    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.
    • K
      keenwa last edited by

      Simply trying to get a drawer to automatically close upon detection of a new route, which is what the persistence property is all about ( https://quasar.dev/layout/drawer when set to default true: does not auto-closes when app’s route changes).

      Problem is that in the Vue dev tool, it’s showing the value as a string (instead of a boolean), even though I have the attribute value unquoted (also tried with quotes just to check)

      Snippet:
      <q-drawer v-model=“left” side=“left” persistent=false>

      Am I missing something here? Much appreciation for any guidance.

      metalsadman 1 Reply Last reply Reply Quote 0
      • metalsadman
        metalsadman @keenwa last edited by metalsadman

        @keenwa not passing a value to it will set it to true, now if you want to control set it true/false then just bind a boolean data to it :persistent="isPersist".

        1 Reply Last reply Reply Quote 0
        • K
          keenwa last edited by

          @metalsadman thanks so much for the quick reply, you are clearly a rock star.

          Your fix did in fact work to get the property correctly showing in the Vue dev tool (as false), but the drawer is still remaining open upon changing of the route. I figured it would auto-collapse after changing routes, but it just stays open.

          new snippet:
          <q-drawer v-model=“left” side=“left” :persistent=“isPersist”> // isPersist is being set to false in the export data(), and verified working in Vue dev tool

          Thanks again!

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