Skip to content

Releases: trendmicro-frontend/react-checkbox

v3.4.1

10 Aug 10:06
Compare
Choose a tag to compare

Address an issue where checking element type for imported components is not possible with projects using react-hot-loader (7b8b65d)

v3.4.0

22 May 09:13
Compare
Choose a tag to compare
  • [IE only] Address an issue that the change event never fires for indeterminate input elements (6a2fba9)

    Use onClick event handler if you want to have a cross-browser solution for handling indeterminate input elements.

    <Checkbox
        checked={checked}
        indeterminate={indeterminate}
        onClick={(event) => {
            const { checked, indeterminate } = event.target;
            if ((!checked && indeterminate) || checked) {
                // Check
            } else {
                // Uncheck
            }
        }}
    />

    Also see jquery/jquery#1698

v3.3.1

18 Apr 08:31
Compare
Choose a tag to compare

Update icons that was previously broken in v3.3.0 (e690c8c)

v3.3.0

10 Apr 08:16
c909781
Compare
Choose a tag to compare

Update icons (ca5e210)

v3.2.0

14 Feb 03:30
Compare
Choose a tag to compare

Add a "depth" prop to limit the recursion depth when rendering checkboxes deeply inside a checkbox group (62843f0)

Example

<CheckboxGroup
    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">
            <Checkbox label="Batman (DC)" value="dc:batman" />
            <Checkbox label="Hulk (Marvel)" value="marvel:hulk" />
        </div>
        <div className="col-xs-12 col-sm-6">
            <Checkbox label="Superman (DC)" value="dc:superman" />
            <Checkbox label="Spider-Man (Marvel)" value="marvel:spiderman" disabled />
        </div>
    </div>
</CheckboxGroup>

v3.1.0

13 Feb 11:45
Compare
Choose a tag to compare

CheckboxGroup support (0e89e23)

v3.0.0

22 Dec 07:47
Compare
Choose a tag to compare

Refactors Checkbox component that attaches text label next to the checkbox element

Usage

<Checkbox label="Checkbox label" />

The label prop is optional, you can use children to pass through the component.

<Checkbox label="Checkbox label">
    <p style={{ marginLeft: 24 }}>
        Lorem ipsum dolor sit amet...
    </p>
</Checkbox>

<Checkbox>
    <span style={{ verticalAlign: 'middle', marginLeft: 8 }}>
        Lorem ipsum dolor sit amet...
    </span>
</Checkbox>

Uncontrolled Checkbox

// Default checked
<Checkbox defaultChecked />

// Default partially checked
<Checkbox defaultChecked defaultIndeterminate />

Controlled Checkbox

// Checked
<Checkbox checked />

// Partially checked
<Checkbox checked indeterminate />

v2.1.1

17 Nov 03:50
5123b8f
Compare
Choose a tag to compare
  1. Move essential chained-function library to node module dependencies.
  2. Add rimraf for cross-platform compatibilities when running npm run clean script.

v2.1.0

19 Oct 14:05
Compare
Choose a tag to compare
  1. Re-support label
  2. Remove default value of props "defaultChecked"

v2.0.0

17 Oct 06:46
Compare
Choose a tag to compare

Make it could get checked status.