UNPKG

react-form-controlled

Version:

Intuitive react forms for building powerful applications

37 lines (31 loc) 700 B
import React from 'react'; import ProvideProps from './ProvideProps'; export default class Working extends ProvideProps { componentDidMount() { const form = this.getForm(); form.registerChild(this); } componentWillUnmount() { const form = this.getForm(); form.unregisterChild(this); } originalValueChanged() { const form = this.getForm(); this.setState({ isWorking: form.isWorking() }); } renderEmptyChildren({ isWorking }) { return React.createElement( 'span', null, isWorking ? 'working' : 'idle' ); } getProps() { return { isWorking: this.state.isWorking }; } } //# sourceMappingURL=Working.js.map