diff options
Diffstat (limited to 'src/client/views/nodes/LoadingBox.tsx')
-rw-r--r-- | src/client/views/nodes/LoadingBox.tsx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/client/views/nodes/LoadingBox.tsx b/src/client/views/nodes/LoadingBox.tsx index bbb725a3d..27d73a585 100644 --- a/src/client/views/nodes/LoadingBox.tsx +++ b/src/client/views/nodes/LoadingBox.tsx @@ -38,19 +38,17 @@ export class LoadingBox extends ViewBoxAnnotatableComponent<FieldViewProps>() { return FieldView.LayoutString(LoadingBox, fieldKey); } // removes from currently loading display - @action public static removeCurrentlyLoading(doc: Doc) { if (DocumentManager.Instance.CurrentlyLoading) { const index = DocumentManager.Instance.CurrentlyLoading.indexOf(doc); - index !== -1 && DocumentManager.Instance.CurrentlyLoading.splice(index, 1); + runInAction(() => index !== -1 && DocumentManager.Instance.CurrentlyLoading.splice(index, 1)); } } // adds doc to currently loading display - @action public static addCurrentlyLoading(doc: Doc) { if (DocumentManager.Instance.CurrentlyLoading.indexOf(doc) === -1) { - DocumentManager.Instance.CurrentlyLoading.push(doc); + runInAction(() => DocumentManager.Instance.CurrentlyLoading.push(doc)); } } |