Reset modal spinner state when dismissed; closes #2647

This commit is contained in:
Dane Everitt 2020-11-02 20:03:28 -08:00
parent 027c705733
commit 7ec614ed2c
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53

View file

@ -43,7 +43,7 @@ function asModal<P extends object> (modalProps?: ExtendedModalProps | ((props: P
componentDidUpdate (prevProps: Readonly<P & AsModalProps>) { componentDidUpdate (prevProps: Readonly<P & AsModalProps>) {
if (prevProps.visible && !this.props.visible) { if (prevProps.visible && !this.props.visible) {
// noinspection JSPotentiallyInvalidUsageOfThis // noinspection JSPotentiallyInvalidUsageOfThis
this.setState({ visible: false }); this.setState({ visible: false, showSpinnerOverlay: false });
} else if (!prevProps.visible && this.props.visible) { } else if (!prevProps.visible && this.props.visible) {
// noinspection JSPotentiallyInvalidUsageOfThis // noinspection JSPotentiallyInvalidUsageOfThis
this.setState({ render: true, visible: true }); this.setState({ render: true, visible: true });