From b8205f4c387a129096f62927dab05358107171fa Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Sat, 22 Apr 2017 17:31:37 -0600 Subject: [PATCH] Close the "open" dialog after choosing a new style --- src/components/modals/OpenModal.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/modals/OpenModal.jsx b/src/components/modals/OpenModal.jsx index 0f33347..ef0556c 100644 --- a/src/components/modals/OpenModal.jsx +++ b/src/components/modals/OpenModal.jsx @@ -68,6 +68,7 @@ class OpenModal extends React.Component { const mapStyle = style.ensureStyleValidity(JSON.parse(body)) console.log('Loaded style ', mapStyle.id) this.props.onStyleOpen(mapStyle) + this.onOpenToggle() } else { console.warn('Could not open the style URL', styleUrl) } @@ -94,6 +95,7 @@ class OpenModal extends React.Component { } mapStyle = style.ensureStyleValidity(mapStyle) this.props.onStyleOpen(mapStyle); + this.onOpenToggle(); } reader.onerror = e => console.log(e.target); }