From 7fc711c6f2025e34752c699d64c36ed299915c1f Mon Sep 17 00:00:00 2001 From: Jori Lallo Date: Wed, 6 Jul 2016 23:26:36 -0700 Subject: [PATCH] Only use header loader when updating navigation tree --- src/scenes/DocumentScene/DocumentScene.js | 1 + src/scenes/DocumentScene/DocumentSceneStore.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/scenes/DocumentScene/DocumentScene.js b/src/scenes/DocumentScene/DocumentScene.js index 7ff9022af..6b1ec7282 100644 --- a/src/scenes/DocumentScene/DocumentScene.js +++ b/src/scenes/DocumentScene/DocumentScene.js @@ -116,6 +116,7 @@ class DocumentScene extends React.Component { title={ title } titleText={ titleText } actions={ actions } + loading={ this.store.updatingStructure } > { this.store.isFetching ? ( diff --git a/src/scenes/DocumentScene/DocumentSceneStore.js b/src/scenes/DocumentScene/DocumentSceneStore.js index acbac48c2..5e5f59970 100644 --- a/src/scenes/DocumentScene/DocumentSceneStore.js +++ b/src/scenes/DocumentScene/DocumentSceneStore.js @@ -7,6 +7,7 @@ class DocumentSceneStore { @observable document; @observable isFetching = true; + @observable updatingStructure = false; @observable isDeleting; /* Computed */ @@ -52,7 +53,7 @@ class DocumentSceneStore { return true; } - this.isFetching = true; + this.updatingStructure = true; try { const res = await client.post('/atlases.updateNavigationTree', { @@ -66,7 +67,7 @@ class DocumentSceneStore { } catch (e) { console.error("Something went wrong"); } - this.isFetching = false; + this.updatingStructure = false; } };