From 2400c8ed00f17437d29778f8aeb90e5782823cd1 Mon Sep 17 00:00:00 2001 From: orangemug Date: Sun, 2 Apr 2017 16:02:57 +0100 Subject: [PATCH] Clear error on modal toggle. --- src/components/modals/OpenModal.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/modals/OpenModal.jsx b/src/components/modals/OpenModal.jsx index 440343c..0f33347 100644 --- a/src/components/modals/OpenModal.jsx +++ b/src/components/modals/OpenModal.jsx @@ -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 this.onOpenToggle()} title={'Open Style'} > {errorElement}