mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-11-10 11:37:45 +01:00
Exposed onInput in <UrlInput/>
This commit is contained in:
parent
f0371b41b1
commit
e728e5f7e4
1 changed files with 5 additions and 0 deletions
|
@ -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 () {
|
||||
|
|
Loading…
Reference in a new issue