diff options
author | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2020-10-21 02:21:04 +0800 |
---|---|---|
committer | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2020-10-21 02:21:04 +0800 |
commit | 5ec2c0160ad20b10e74a9ca0f7c5e988173937d7 (patch) | |
tree | 54b52d8f5f0146e1655bb277d49b997814d75a70 /src/client/views/nodes/PresBox.tsx | |
parent | 50fa76eb644bc9fe2de7525f0f144c4393341af7 (diff) | |
parent | 52161a48a9d5f0732e6fe741a8a9a7c2b6dac49e (diff) |
Merge branch 'master' into presentation_v1
Diffstat (limited to 'src/client/views/nodes/PresBox.tsx')
-rw-r--r-- | src/client/views/nodes/PresBox.tsx | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/client/views/nodes/PresBox.tsx b/src/client/views/nodes/PresBox.tsx index 755f6e166..521a3796b 100644 --- a/src/client/views/nodes/PresBox.tsx +++ b/src/client/views/nodes/PresBox.tsx @@ -718,19 +718,13 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema> handled = true; } if (e.keyCode === 8) { // delete (backspace) selected items if (this.layoutDoc.presStatus === "edit") { - - let result: any = []; runInAction(() => { - for (let doc of this._selectedArray) { - setTimeout(() => { - const removed: boolean = this.removeDocument(doc); - result.push(removed) - console.log("Is removed? : " + " | " + removed); - }, 100); + for (const doc of this._selectedArray) { + this.removeDocument(doc); } - this._selectedArray = [] - this._eleArray = [] - this._dragArray = [] + this._selectedArray = []; + this._eleArray = []; + this._dragArray = []; }); handled = true; } |