Only use header loader when updating navigation tree
This commit is contained in:
@@ -116,6 +116,7 @@ class DocumentScene extends React.Component {
|
|||||||
title={ title }
|
title={ title }
|
||||||
titleText={ titleText }
|
titleText={ titleText }
|
||||||
actions={ actions }
|
actions={ actions }
|
||||||
|
loading={ this.store.updatingStructure }
|
||||||
>
|
>
|
||||||
{ this.store.isFetching ? (
|
{ this.store.isFetching ? (
|
||||||
<CenteredContent>
|
<CenteredContent>
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ class DocumentSceneStore {
|
|||||||
@observable document;
|
@observable document;
|
||||||
|
|
||||||
@observable isFetching = true;
|
@observable isFetching = true;
|
||||||
|
@observable updatingStructure = false;
|
||||||
@observable isDeleting;
|
@observable isDeleting;
|
||||||
|
|
||||||
/* Computed */
|
/* Computed */
|
||||||
@@ -52,7 +53,7 @@ class DocumentSceneStore {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.isFetching = true;
|
this.updatingStructure = true;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const res = await client.post('/atlases.updateNavigationTree', {
|
const res = await client.post('/atlases.updateNavigationTree', {
|
||||||
@@ -66,7 +67,7 @@ class DocumentSceneStore {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Something went wrong");
|
console.error("Something went wrong");
|
||||||
}
|
}
|
||||||
this.isFetching = false;
|
this.updatingStructure = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user