aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/PresBox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/PresBox.tsx')
-rw-r--r--src/client/views/nodes/PresBox.tsx16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/client/views/nodes/PresBox.tsx b/src/client/views/nodes/PresBox.tsx
index 01a7bed8c..677d612b6 100644
--- a/src/client/views/nodes/PresBox.tsx
+++ b/src/client/views/nodes/PresBox.tsx
@@ -710,14 +710,14 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema>
handled = true;
} if (e.keyCode === 8) { // delete selected items
if (this.layoutDoc.presStatus === "edit") {
- await Promise.all<boolean>(this._selectedArray.map((doc, i): boolean => {
- const removed: boolean = this.removeDocument(doc);
- console.log("Is removed? : " + i + " | " + removed);
- return removed;
- }));
- action(() => this._selectedArray = []);
- action(() => this._eleArray = []);
- action(() => this._dragArray = []);
+ runInAction(() => {
+ for (const doc of this._selectedArray) {
+ this.removeDocument(doc);
+ }
+ this._selectedArray = [];
+ this._eleArray = [];
+ this._dragArray = [];
+ });
handled = true;
}
} if (handled) {