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