Giter Club home page Giter Club logo

Comments (6)

raycohen avatar raycohen commented on July 20, 2024

value is expected to be provided differently on each radio-button component. Therefore if valueA and valueB are different, you can't have both match the groupValue. Maybe this is a documentation issue or a naming issue?

from ember-radio-button.

r00b avatar r00b commented on July 20, 2024

In the context of my issue, every radio button represents an object, and selecting a radio button will set field === true in the corresponding object. Ideally, after the user submits the form, I can iterate through these objects, find the one with field === true, and do with it what I want.

from ember-radio-button.

raycohen avatar raycohen commented on July 20, 2024

if you're able to make a pull request that adds a simple example to the dummy app inside the addon (like these examples https://github.com/yapplabs/ember-radio-button/blob/master/tests/dummy/app/templates/index.hbs) that would help me diagnose. I can look into this more over the weekend. It sounds like usage that we intend to facilitate.

from ember-radio-button.

raycohen avatar raycohen commented on July 20, 2024

I've opened a PR with an example showing passing objects to the value and groupValue and seeing the behavior I expect. Let me know if this matches the use case you were describing:

#61

from ember-radio-button.

r00b avatar r00b commented on July 20, 2024

I think I was misunderstanding how to use the addon. I see now that the value of selectedColorObject will indicate which object was ultimately selected by the user. Though it's my own fault for overlooking the assumption that value is expected to differ among each invocation of the component (which in hindsight is glaringly obvious) it may be a good idea to make a note of this on the README.

from ember-radio-button.

raycohen avatar raycohen commented on July 20, 2024

closing as we've given the README an overhaul

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.