Skip to content

Radio buttons not working correctly #242

@chenglou

Description

@chenglou
  render: function() {
    return (
      <div>
        <input type="radio" name="fruit" value="A" checked={true}/>A
        <input type="radio" name="fruit" value="B"/>B
      </div>
    );
  }

Expected behavior would be for A to stay checked when B is clicked, but it's not the case.

jsFiddle

Similarly, here's a modified version that works on every subsequent click on B, but not the first time. If this helps, setting a timeout 0 around this.refs.A.getDOMNode().checked = true works (except it gives a flash when you click on B, which is less than ideal)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions