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

    Help separating drawers from Index.vue

    Help
    2
    4
    1214
    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
      limjackson last edited by limjackson

      Hi guys, currently I have a drawer working in my Index.vue file. However, how do I separate it into another component such that I can still use a button from Index.vue to open and close the drawer, and also able to implement classes such as the hide-on-drawer-visible class though the drawer is being called from another component? All I can get now is the drawer being displayed permanently on the page

      Edit: Alright, I can make my main drawer hide when the screen is small and show when the screen is big enough. However, I still can’t wrap my head how to close/open a drawer that is being referenced from another component and also have it to hide when the screen is big enough

      1 Reply Last reply Reply Quote 0
      • rstoenescu
        rstoenescu Admin last edited by

        You need to communicate between Vue components. There’s a section on how to use events in the Vue documentation website.

        1 Reply Last reply Reply Quote 1
        • L
          limjackson last edited by limjackson

          Alright, thanks. I’ll look into it.
          I assume it’s somewhere in here: https://vuejs.org/v2/guide/events.html

          1 Reply Last reply Reply Quote 0
          • L
            limjackson last edited by limjackson

            I managed to solve my problem but the drawer component in my other .vue file is not tagged with <q-drawer>, just a <div> instead. Then I referenced that in a <q-drawer> in Index.vue. It’s definitely not the right way but it solves my issue.

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