Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load drawer menuitems async with async setup() and <Suspense>, but nothing showed up #16

Open
softboy99 opened this issue Dec 31, 2020 · 0 comments

Comments

@softboy99
Copy link

In your application template all of the menuitems are statically. Howerver, in real world, the menuitems are dynamically loaded from the server.

<!-- eslint-disable vue/valid-v-model -->
  <dx-drawer
    class="layout-body"
    position="before"
    template="default"
    v-model:opened="menuOpened"
    :opened-state-mode="drawerOptions.menuMode"
    :reveal-mode="drawerOptions.menuRevealMode"
    :min-size="drawerOptions.minMenuSize"
    :shading="drawerOptions.shaderEnabled"
    :close-on-outside-click="drawerOptions.closeOnOutsideClick"
  >

<!-- eslint-enabled -->
  <dx-scroll-view ref="scrollViewRef" class="with-footer">
    <slot />
    <slot name="footer" />
  </dx-scroll-view>   
    <Suspense>
      <template #default> 
              <side-nav-menu
              :compact-mode="!menuOpened"
              @click="handleSideBarClick"
            />
      </template>
    </Suspense>
  <!-- eslint-enable -->
</dx-drawer>
` `

@LexDX LexDX transferred this issue from DevExpress/devextreme-cli Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant