aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/presentationview/PresElementBox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/presentationview/PresElementBox.tsx')
-rw-r--r--src/client/views/presentationview/PresElementBox.tsx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/views/presentationview/PresElementBox.tsx b/src/client/views/presentationview/PresElementBox.tsx
index e1b97887a..7ff21975b 100644
--- a/src/client/views/presentationview/PresElementBox.tsx
+++ b/src/client/views/presentationview/PresElementBox.tsx
@@ -208,14 +208,13 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps, PresDoc
}
@undoBatch
- @action
- removeItem = (e: React.MouseEvent) => {
+ removeItem = action((e: React.MouseEvent) => {
this.props.removeDocument?.(this.rootDoc);
if (PresBox.Instance._selectedArray.includes(this.rootDoc)) {
PresBox.Instance._selectedArray.splice(PresBox.Instance._selectedArray.indexOf(this.rootDoc), 1);
}
e.stopPropagation();
- }
+ })
render() {
const className = "presElementBox-item" + (PresBox.Instance._selectedArray.includes(this.rootDoc) ? " presElementBox-active" : "");