Only use header loader when updating navigation tree

This commit is contained in:
Jori Lallo 2016-07-06 23:26:36 -07:00
parent 04d71d44e3
commit 7fc711c6f2
2 changed files with 4 additions and 2 deletions

View File

@ -116,6 +116,7 @@ class DocumentScene extends React.Component {
title={ title }
titleText={ titleText }
actions={ actions }
loading={ this.store.updatingStructure }
>
{ this.store.isFetching ? (
<CenteredContent>

View File

@ -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;
}
};