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

    Adding and opening right drawer with specific component or view

    Help
    1
    1
    754
    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.
    • R
      rv last edited by

      I wanted to show right drawer for just two views or within two components in the entire app on a button click and the content are coming from those components only (some dynamic content).
      Can I achieve something like this without adding right drawer slot in my main q-layout component?

      <template>
        <div class="layout-padding">
          <!-- code for quasar drawer which I couldn't figure out without q-layout! -->
        
          <q-btn flat v-for="item in myList" @click="openSuggestions(myList[item].suggestions)">
            {{item}} Suggestions
          <q-btn>
        </div>
      </template>
      
      <script>
      import { QBtn } from 'quasar'
      
      export default {
        components: {
          QBtn 
        },
        data () {
          return {
            myList: {
              name: { suggestions: ['related link 1', 'related link 2', 'related link 3'] }
              company: { suggestions: ['related link 4', 'related link 5'] }
            }
          } 
        },
        methods: {
          openSuggestions: function (list) {
            // Pass list to right drawer
            // Open right drawer
          }
        }
      } 
      </script>
      
      

      Thanks in advance for any suggestions. Above code is just a snippet I typed here from my component so may have some typo or syntax issues.

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