posva / vue-mdc

Material web components for Vue.js
MIT License
1.19k stars 101 forks source link

Bind menu dynamically to list items #249

Open ph777 opened 6 years ago

ph777 commented 6 years ago

Hi there, thanks for great project. This is maybe not a issue but a newbie question (regarding the mdl branch).

What I'm trying to do is to build a list (mdl-list) with items, where each item has a menu button. In MDL it is common to have one menu definition for one menu button. In my scenario there is a lot of items that share the same menu definition. Therefore I'd like to have one menu definition shared by several items. How to accomplish this? I can't get menu definition rebind dynamically to a clicked menu button. The mdl-menus for/target attribute cannot be used, as it is bound only once. Is there a way to do it?

Thanks for any ideas.