Integrating MDCSelect to vuejs help
See original GitHub issuematerial-components-web: 0.13.0
I just looked at the index.js
to see how the default implementations work and change things from there to match how vuejs does things… or actually, I just use refs
instead.
Anyway, here’s the code:
For the MDCSimpleMenu
:
~https://www.hastebin.com/ecazajarub.xml~
For the MDCSelect
:
~https://www.hastebin.com/cuvewejati.xml~
The select is not opening. I’m not sure what’s wrong. I just converted the defaults to vuejs one.
EDIT
Ok, re-read the docs and saw I should be returning MDCSimpleMenu
. But how can I return MDCSimpleMenu
using my own integration? currently, I pass it an MDCSimpleMenuFoundation
instance.
EDIT
I missed the init()
. Now I get menu.listen
is not a function.
If you’ll look at my MDCSelect
integration, I have there let menu = this.$refs.menu.foundation
. Again, I instead access the foundation of MDCSimpleMenu
and it listen
is coming from MDCComponent
which I don’t extend.
How should I then fix this?
EDIT
on my MDCSimpleMenu
, I created a method listen
that actually calls its own registerInteractionHandler
and added a getItems()
method on its adapter so MSelect
can access its items.
No errors now, but still not working. It doesn’t open. No DOM changes (classes, or anything).
MDCSelect: https://www.hastebin.com/vufibupumu.xml MDCSimpleMenu: https://www.hastebin.com/moxazecuka.xml
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
maybe u can get help with the link https://github.com/stasson/vue-mdc-adapter
Looks like this issue has gone stale. Going to close.