Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ember-radio-button v1.0.4 causing deprecation warning, updating breaks radio buttons #178

Closed
mdehoog opened this issue Jul 13, 2015 · 4 comments
Labels

Comments

@mdehoog
Copy link
Contributor

mdehoog commented Jul 13, 2015

ember-cli-materialize is currently pointing at v1.0.4 of ember-radio-button. This version accesses the template property in the radio-button component, which is deprecated in Ember 1.13:

DEPRECATION: Accessing 'template' in <critik-client@component:radio-button::ember792> is deprecated. To determine if a block was specified to <critik-client@component:radio-button::ember792> please use '{{#if hasBlock}}' in the components layout.

This was fixed in ember-radio-button v1.0.6. Updating the dependency removes the deprecation warning, but the radio buttons in ember-cli-materialize become un-checkable (as if they are disabled) when using the md-radios and md-radio components.

@mike-north mike-north added the bug label Jul 13, 2015
@adam-knights
Copy link
Contributor

Currently the radio buttons in version 0.18.0 are not checkable however they are checkable in 0.17.3. When comparing the mark up between the two versions I notice that a for attribute was missing in the label and the class "materialize-selectable-item-input" is missing in the input (below).

Version 0.17.3

<div id="ember617" class="ember-view materialize-selectable-item">
   <input id="ember630" type="radio" value="1" class="materialize-selectable-item-input ember-view">
   <label class="materialize-selectable-item-label materialize-selectable-item-label" for="ember630">
      One<!---->
   </label>
</div>

Version 0.18.0

<div id="ember615" class="ember-view materialize-selectable-item">
<input id="ember628" type="radio" value="1" class="ember-view">
   <label class="materialize-selectable-item-label materialize-selectable-item-label">
     One<!---->
   </label>
</div>

@mike-north
Copy link
Owner

Make sure you update to ember-radio-button 1.0.7 in your app. If you look at the HTML on the demo page, it includes the for attribute on the label tag.

<div id="ember971" class="ember-view materialize-selectable-item">
  <input id="ember989" type="radio" value="1" class="materialize-selectable-item-input ember-view">    
  <label class="materialize-selectable-item-label materialize-selectable-item-label" for="ember989">
     One<!---->
  </label>
</div>

Whenever you upgrade an ember addon, you can re-run its installation blueprint to see if anything needs to be changed (i.e., a package dependency) by running

ember g ember-cli-materialize <your app name>

@mike-north
Copy link
Owner

Please feel free to re-open this if you upgrade everything and still see a problem

@adam-knights
Copy link
Contributor

That solved it thankyou, might be worth adding an 'upgrading' note to the main readme.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants