mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-30 06:15:32 +01:00
Clear error on modal toggle.
This commit is contained in:
parent
396022e8ea
commit
2400c8ed00
1 changed files with 6 additions and 1 deletions
|
@ -98,6 +98,11 @@ class OpenModal extends React.Component {
|
||||||
reader.onerror = e => console.log(e.target);
|
reader.onerror = e => console.log(e.target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onOpenToggle() {
|
||||||
|
this.clearError();
|
||||||
|
this.props.onOpenToggle();
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const styleOptions = publicStyles.map(style => {
|
const styleOptions = publicStyles.map(style => {
|
||||||
return <PublicStyle
|
return <PublicStyle
|
||||||
|
@ -121,7 +126,7 @@ class OpenModal extends React.Component {
|
||||||
|
|
||||||
return <Modal
|
return <Modal
|
||||||
isOpen={this.props.isOpen}
|
isOpen={this.props.isOpen}
|
||||||
onOpenToggle={this.props.onOpenToggle}
|
onOpenToggle={() => this.onOpenToggle()}
|
||||||
title={'Open Style'}
|
title={'Open Style'}
|
||||||
>
|
>
|
||||||
{errorElement}
|
{errorElement}
|
||||||
|
|
Loading…
Reference in a new issue