1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-08 21:42:24 +03:00

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