Sha256: fb11a457a37ae1eeead3f12ce46f2b8beb45ea08b05511a0d77f6083a9eafcde

Contents?: true

Size: 837 Bytes

Versions: 9

Compression:

Stored size: 837 Bytes

Contents

import React from 'react';

export default class IndeterminateCheckbox extends React.Component {
    componentDidMount() { return this.updateIndeterminate(); }
    componentDidUpdate() { return this.updateIndeterminate(); }

    updateIndeterminate() {
        return (
            _.dom(this).el.indeterminate =
                (this.props.checked !== true) && (this.props.checked !== false)
        );
    }

    handleCheckboxChange(ev) {
        if (ev.target.checked) {
            return (
                this.fieldMixinSetValue( new FakeInputEvent(this.props.value) )
            );
        }
    }

    render() {
        return (
            <input
                type="checkbox"
                {...this.props}
                checked={this.props.checked}
                onChange={this.props.onChange} />
        );
    }
}

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
hippo-fw-0.9.5 client/hippo/components/shared/IndeterminateCheckbox.jsx
hippo-fw-0.9.4 client/hippo/components/shared/IndeterminateCheckbox.jsx
hippo-fw-0.9.3 client/hippo/components/shared/IndeterminateCheckbox.jsx
hippo-fw-0.9.2 client/hippo/components/shared/IndeterminateCheckbox.jsx
hippo-fw-0.9.1 client/hippo/components/shared/IndeterminateCheckbox.jsx
lanes-0.8.3 client/lanes/components/shared/IndeterminateCheckbox.jsx
lanes-0.8.2 client/lanes/components/shared/IndeterminateCheckbox.jsx
lanes-0.8.1 client/lanes/components/shared/IndeterminateCheckbox.jsx
lanes-0.8.0 client/lanes/components/shared/IndeterminateCheckbox.jsx