-
-
Notifications
You must be signed in to change notification settings - Fork 101
mdl-menu-item and v-if not working well together #86
Comments
Yes, this is because the approach of upgrading the dom element with the MDL methods isn't the best approach, it's better to handle the items with Vue and mostly use MDL for styling. This is ofc related to mdl internal implementation. Hopefully this won't be the same in v2 |
So... I'm still a little confused about what I should do in this scenario - apart from wait for MDL v2? I guess I could try putting a v-if around whole menu? |
@dsl101 Actually you can try to implement it yourself for your project in a different way from vue-mdl: without using the |
Well, I was hoping to do something clever with putting 2 completely different menus / buttons in a div with
The item appears disabled, but clicking it still fires the event. No binding, conditional |
There're no props menu item actually. Honestly, building your own menu is the way to go 😆 |
Closing this is favor of #46 |
I'm not sure if this is an underlying MDL issue, but I'm trying to build a menu which has a conditional item in it:
canAddProject()
is a computed property which returns true or false. If I remove thev-if
, all works fine (except everyone sees the 'New Project' menu item). With thev-if
, the menu fires thenewProject()
function, but it doesn't close. At the moment, all the event handlers justconsole.log()
their activation, so I don't think it's anything in there causing a problem. Have you seen this before? Is there a workaround?The text was updated successfully, but these errors were encountered: