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
    1. Home
    2. joshbodine
    J
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 3
    • Best 0
    • Groups 0

    joshbodine

    @joshbodine

    0
    Reputation
    323
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    joshbodine Follow

    Latest posts made by joshbodine

    • RE: Opening the left drawer from within another component?

      Never mind, I realized my mistake. In the code above I needed to add ref=“leftDrawer” to the “wis-sidebar” component in App.vue and not to the drawer within the component itself. Thanks for the help.

      posted in Help
      J
      joshbodine
    • RE: Opening the left drawer from within another component?

      For my App.Vue I have

      <template>
      <div id=“q-app”>
      <q-layout>
      <div slot=“header” class=“toolbar”>
      <button class=“hide-on-drawer-visible” @click="$refs.leftDrawer.open()"><i>menu</i></button>
      <q-toolbar-title :padding=“1”>Title</q-toolbar-title>
      </div>
      <wis-sidebar></wis-sidebar>
      </q-layout>
      </div>
      </template>

      Within the “wis-sidebar” component above, I then have the drawer with the ref:

      <template>
      <q-drawer ref=“leftDrawer”>
      <div class=“list”>
      <div v-for=“item in items”>
      <q-collapsible v-if=“item.items” group=“sidebar” :icon=“item.icon” :label=“item.label”>
      <router-link v-for=“subItem in item.items” tag=“div” class=“item item-link” :to=“subItem.route” exact>
      <i class=“item-primary”>{{ subItem.icon }}</i>
      <div class=“item-content”>{{ subItem.label }}</div>
      </router-link>
      </q-collapsible>
      <router-link v-else tag=“div” class=“item item-link” :to=“item.route” exact>
      <i class=“item-primary”>{{ item.icon }}</i>
      <div class=“item-content”>{{ item.label }}</div>
      </router-link>
      </div>
      </div>
      </q-drawer>
      </template>

      I’m not sure how I would add a method in the component to open it from the click of the button within the App.vue above?

      posted in Help
      J
      joshbodine
    • RE: Opening the left drawer from within another component?

      What if I have a custom component that I place the q-drawer component into and then import that custom component to my App.vue. From within my App.vue file how do I have the button there open the drawer that is within my imported custom component?

      posted in Help
      J
      joshbodine