question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Integrating MDCSelect to vuejs help

See original GitHub issue

material-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:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Jul 3, 2017

maybe u can get help with the link https://github.com/stasson/vue-mdc-adapter

0reactions
moog16commented, Apr 19, 2019

Looks like this issue has gone stale. Going to close.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - Integrating MDCSelect to vuejs help - - Bountysource
I just looked at the index.js to see how the default implementations work and change things from there to match how vuejs does...
Read more >
Material Components integration for Vue.js
vue-mdc-adapter is an integration of Material Components and Vue.js which follows the best practices recommended by Google: Using ...
Read more >
Material design nuxt integration - vue.js - Stack Overflow
I'm new to Nuxt framework and i want to integrate the material design library ... from "@material/textfield/icon" import { MDCSelect } from ...
Read more >
Vue.js - The Progressive JavaScript Framework | Vue.js
Builds on top of standard HTML, CSS and JavaScript with intuitive API and world-class documentation. Performant. Truly reactive, compiler-optimized rendering ...
Read more >
Integrate Web Components with Your Vue.js App - DigitalOcean
Fun fact, you can use Web Components in Vue.js apps just like any other ... products which can also help you achieve your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found