yaminncco / vue-sidebar-menu

A Vue.js Sidebar Menu Component

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@update:collapsed doesn't work

jerichosiahaya opened this issue · comments

I tried to use @update:collapsed to read the collapsed state and use it to trigger a function like this @update:collapsed="onToggleCollapse", but it doesn't read any the collapsed state at all. Tried to use it as you wrote on the documentation and add a console.log to see if it's already change but still doesn't work.

onToggleCollapse (collapsed) {
      // eslint-disable-next-line no-console
      console.log('Collapsed')
    }

Any idea why is this happen? I use Vue 2 with Nuxt.js

Okay, nevermind, I solved. I use Vue 2, so the collapse event would be @toggle-collapse not @update:collapsed. Maybe a changelog would be a great idea so people (like me 😜) wouldn't confuse again if there's sort of change between the version.