Call the parent component's `onChange` if it exists

pull/21833/head
J. Ryan Stinnett 2019-03-07 14:45:18 +00:00
parent 7241418eba
commit 57ce4d6e7d
1 changed files with 4 additions and 0 deletions

View File

@ -70,6 +70,10 @@ export default class Field extends React.PureComponent {
feedback: result.feedback,
});
}
// Parent component may have supplied its own `onChange` as well
if (this.props.onChange) {
this.props.onChange(ev);
}
};
render() {