8000 Issue with Navba submenu b-dropdown-item · bootstrap-vue-next bootstrap-vue-next · Discussion #2340 · GitHub
[go: up one dir, main page]

Skip to content

Issue with Navba submenu b-dropdown-item #2340

Closed Answered by xvaara
yingfeng-iu asked this question in Q&A
Discussion options

You must be logged in to vote

Quick look only so might be wrong, but hopefully will give you direction finding your bug:

 <b-nav-item-dropdown
  :class="{ 
    'd-none': resolvePermissions(menu.permissionKey)
  }"
  v-else
>

in vue functions aren't reactive, so I think your acActions variable, that is used in resolvePermissions, isn't loaded on the first load, and cached on the second (in createPersistedState, so localStorage?). I don't know how your state is loaded, haven't used vuex in years.

on defaultState the acActions is an empty array, and you're using reduce((acc, current) => acc && current, true) which defaults to true. Maybe default it to false?

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by xvaara
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
0