mirror of
https://github.com/maputnik/editor.git
synced 2026-01-04 12:30:00 +00:00
Exposed onInput in <UrlInput/>
This commit is contained in:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user