Exposed onInput in <UrlInput/>

This commit is contained in:
orangemug 2019-10-27 17:35:56 +00:00
parent f0371b41b1
commit e728e5f7e4

View file

@ -42,6 +42,10 @@ class UrlInput extends React.Component {
required: PropTypes.bool,
}
static defaultProps = {
onInput: () => {},
}
constructor (props) {
super(props);
this.state = {
@ -53,6 +57,7 @@ class UrlInput extends React.Component {
this.setState({
error: validate(url)
});
this.props.onInput(url);
}
render () {