onehilltech / ember-cli-mdc

ember-cli addon for material-components-web
Apache License 2.0
44 stars 15 forks source link

Unable to render {{mdc-select}} #27

Closed waissbluth closed 4 years ago

waissbluth commented 4 years ago

I am having trouble rendering the {{mdc-select}} in an Ember 3.13 app. I have not been able to reproduce this in fresh app, but it does happen regardless of the parameters passed to the component (and even with no parameters).

I am having trouble debugging this or getting to the root cause, so any help is appreciated.

This is on ember-cli-mdc-select version 1.0.0-alpha.12.

Uncaught Error: MDCSelect: Missing required element: The following selector must be present: '.mdc-select__selected-text'
    at MDCSelect.initialize (component.ts:85)
    at MDCSelect.MDCComponent (component.ts:45)
    at new MDCSelect (component.ts:43)
    at Class.didInsertElement (mdc-select.js:38)
    at Class.superWrapper [as didInsertElement] (utils.js:366)
    at Class.trigger (core_view.js:70)
    at Class.superWrapper [as trigger] (utils.js:366)
    at CurlyComponentManager.didCreate (glimmer.js:4479)
    at Transaction.commit (runtime.js:3187)
    at Environment$1.commit (runtime.js:3282)

Thanks!

waissbluth commented 4 years ago

This was fixed by downgrading @material/select from version 4.0 to 3.2, which does not seem to be supported and shouldn't have been upgraded in the first place i suppose

hilljh82 commented 4 years ago

Hi Nicolas,

That is correct. This version builds against 3.2.

After releasing ember-cli-mdc 1.0, we will being working on ember-cli-mdc 2.0. Version 2.0 will support material-components-web 4.0 and Ember Octane.