Upgrade to new form binder

This commit is contained in:
John Lyon-Smith
2018-05-15 13:09:13 -07:00
parent 8fcfa26063
commit aa2da7d55d
26 changed files with 307 additions and 194 deletions

View File

@@ -11,12 +11,12 @@ export class BoundEmailIcon extends React.Component {
constructor(props) {
super(props)
this.state = props.binder.getFieldState(props.name)
this.state = props.binder.getBindingState(props.name)
}
componentWillReceiveProps(nextProps) {
if (nextProps.binder !== this.props.binder) {
this.setState(nextProps.binder.getFieldState(nextProps.name))
this.setState(nextProps.binder.getBindingState(nextProps.name))
}
}