Skip to content

v3.2.0

Compare
Choose a tag to compare
@cheton cheton released this 14 Feb 03:24
· 12 commits to master since this release

Add a "depth" prop to limit the recursion depth when rendering radio buttons deeply inside a radio group (6750fe8)

Example

<RadioGroup
    name="comic"
    value={this.state.value}
    depth={3} // This is needed to minimize the recursion overhead
    onChange={(value, event) => {
        this.setState({ value: value });
    }}
>
    <div className="row">
        <div className="col-xs-12 col-sm-6">
            <RadioButton label="Batman (DC)" value="dc:batman" />
            <RadioButton label="Hulk (Marvel)" value="marvel:hulk" />
        </div>
        <div className="col-xs-12 col-sm-6">
            <RadioButton label="Superman (DC)" value="dc:superman" />
            <RadioButton label="Spider-Man (Marvel)" value="marvel:spiderman" disabled />
        </div>
    </div>
</RadioGroup>