Giter Club home page Giter Club logo

Comments (11)

raycohen avatar raycohen commented on July 20, 2024

Thanks for reporting. I'll investigate.

In the mean-time, you can use the labeled-radio-button component provided by this addon (but not currently documented) in places you were using the block form of radio-button.

https://github.com/yapplabs/ember-radio-button/blob/master/addon/components/labeled-radio-button.js

It is re-exported into the app tree and should be usable with no other changes than adding labeled- to the front of your {{#radio-button invocations.

Please report back if that approach is successful.

from ember-radio-button.

ericestes avatar ericestes commented on July 20, 2024

Yes, using labeled-radio-button worked fine. Thanks!

from ember-radio-button.

raycohen avatar raycohen commented on July 20, 2024

Ok. I'm leaving this issue open while I investigate if the overloaded behavior of radio-button is still viable with ember 1.13+

from ember-radio-button.

raycohen avatar raycohen commented on July 20, 2024

Some jsbins that help demonstrate the behavior change

Changing layoutName when component is used as a block in ember 1.12
http://emberjs.jsbin.com/zihixaqaxo/2/edit?html,css,js,output

beta (1.13)
http://emberjs.jsbin.com/zihixaqaxo/3/edit?html,css,js,output

from ember-radio-button.

raycohen avatar raycohen commented on July 20, 2024

emberjs/ember.js#11301

from ember-radio-button.

jerel avatar jerel commented on July 20, 2024

What is the status of this issue? I see that the related Ember issue had a merge and {{#radio-button}} works fine in my v1.13.2 app. However I'm getting deprecation notices from the addon: Accessing 'template' in <my-app@component:radio-button::ember777> is deprecated. To determine if a block was specified...

from ember-radio-button.

btecu avatar btecu commented on July 20, 2024

There is now hasBlock that can be used instead of template.

from ember-radio-button.

raycohen avatar raycohen commented on July 20, 2024

There will be an update using hasBlock soon, but if you want to get rid of deprecations right now you can use {{#labeled-radio-button}} in place of {{#radio-button}}

from ember-radio-button.

jerel avatar jerel commented on July 20, 2024

{{radio-button}} is where the problem code actually lies and the {{#labeled-radio-button}} template calls {{radio-button}} so switching doesn't fix the issue. Using {{#radio-button}} generates twice the deprecation notices because it calls this.get('template') internally and also uses templates/components/labeled-radio-button :)

I worked on a fix for a bit but it's not obvious to me how to overload since hasBlock only exists in template land and is not available in js.

from ember-radio-button.

btecu avatar btecu commented on July 20, 2024

Yes, I switched to {{labeled-radio-button}} and I still get the same deprecation.

from ember-radio-button.

raycohen avatar raycohen commented on July 20, 2024

sorry about that. version 1.0.6, just released, switches to hasBlock which should no longer give any deprecations. Please try it out and let me know if there are any issues!

from ember-radio-button.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.