mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-28 23:50:22 +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);
|
||||
}
|
||||
|
||||
onOpenToggle() {
|
||||
this.clearError();
|
||||
this.props.onOpenToggle();
|
||||
}
|
||||
|
||||
render() {
|
||||
const styleOptions = publicStyles.map(style => {
|
||||
return <PublicStyle
|
||||
|
@ -121,7 +126,7 @@ class OpenModal extends React.Component {
|
|||
|
||||
return <Modal
|
||||
isOpen={this.props.isOpen}
|
||||
onOpenToggle={this.props.onOpenToggle}
|
||||
onOpenToggle={() => this.onOpenToggle()}
|
||||
title={'Open Style'}
|
||||
>
|
||||
{errorElement}
|
||||
|
|
Loading…
Reference in a new issue