From 55dc570cde903c2a012f3e7c8251a0ee07bb1db0 Mon Sep 17 00:00:00 2001 From: Jori Lallo Date: Thu, 29 Jun 2017 22:50:26 -0700 Subject: [PATCH] Updated new loading indicator to document saving --- frontend/components/LoadingIndicator/LoadingIndicator.js | 4 ++++ frontend/scenes/Document/Document.js | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/components/LoadingIndicator/LoadingIndicator.js b/frontend/components/LoadingIndicator/LoadingIndicator.js index 309e6dfb..05247430 100644 --- a/frontend/components/LoadingIndicator/LoadingIndicator.js +++ b/frontend/components/LoadingIndicator/LoadingIndicator.js @@ -10,6 +10,10 @@ import { inject, observer } from 'mobx-react'; componentWillUnmount() { this.props.ui.disableProgressBar(); } + + render() { + return null; + } } export default inject('ui')(LoadingIndicator); diff --git a/frontend/scenes/Document/Document.js b/frontend/scenes/Document/Document.js index 220e24e7..efa89576 100644 --- a/frontend/scenes/Document/Document.js +++ b/frontend/scenes/Document/Document.js @@ -84,9 +84,9 @@ type Props = { const document = this.document; if (!document) return; - this.props.ui.enableProgressBar(); + this.setState({ loading: true }); await document.save(); - this.props.ui.disableProgressBar(); + this.setState({ loading: false }); this.props.ui.disableEditMode(); if (redirect) {