We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7d618d7 commit a09a879Copy full SHA for a09a879
src/form/Form.jsx
@@ -18,6 +18,17 @@ export default class Form extends Component {
18
}
19
20
21
+ componentDidUpdate(newProps: Object): void {
22
+ const {model} = newProps
23
+ const oldModel = this.props.model
24
+ if (!model) return
25
+ const diff = Object.keys(model).filter(key => model[key] !== oldModel[key])
26
+ if (diff.length) {
27
+ this.state.fields.filter(({props}) => props.prop.match(diff))
28
+ .map(field => field.validate('', () => undefined));
29
+ }
30
31
+
32
getChildContext(): { component: Form } {
33
return {
34
component: this
0 commit comments