Giter Club home page Giter Club logo

Comments (3)

raycohen avatar raycohen commented on July 20, 2024

I attempted to make a reproduction of this in the test app and the reset button worked as I expected. Can you share any more about your situation that might be relevant?

Here is my attempted reproduction code:

component

import Ember from 'ember';

export default Ember.Component.extend({
  direction: 'right',

  actions: {
    resetForm() {
      this.set('direction', 'right');
    },

    changeDirection() {
      console.log('changed direction');
    }
  }
});

template

<h3>Reset example</h3>
<div>
  {{radio-button
      value="right"
      groupValue=direction
      changed="changeDirection"}}
  Right
</div>
<div>
  {{radio-button
      value="left"
      groupValue=direction
      changed="changeDirection"}}
    Left
</div>
<div>
  <button {{action 'resetForm'}}> Reset Form</button>
</div>

from ember-radio-button.

solex16 avatar solex16 commented on July 20, 2024

OK, thanks for that feedback..
I think problem might be more to do with the
<label for="rightDirection">
where I have
id="rightDirection"
set on the radio button..
I have fixed by doing
this.set('direction', 'right');
as well as
$('#rightDirection').prop('checked', true);

ie I have to set both in Ember and JQuery, whereas if I don't have changed action I can get away with setting just the Ember object OR the JQuery property..

from ember-radio-button.

raycohen avatar raycohen commented on July 20, 2024

I'm not sure I fully follow what the situation you're encountering is. If you feel there's something that we can add to this library to help, happy to continue discussing

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.