Call the parent component's onChange if it exists

This commit is contained in:
J. Ryan Stinnett 2019-03-07 14:45:18 +00:00
parent 7241418eba
commit 57ce4d6e7d

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() {