aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad Amoush <mohammad_amoush@brown.edu>2019-06-19 15:53:05 -0400
committerMohammad Amoush <mohammad_amoush@brown.edu>2019-06-19 15:53:05 -0400
commit4c1383e47f2203a00bc7f3d73c209f3149d6a772 (patch)
tree77e61a68932b2812f4c6e29e804185ce6ae0f31b
parenta288a2fd0a30a3a16dd01bc4e12dcf6bc117c766 (diff)
...
-rw-r--r--src/client/views/presentationview/PresentationElement.tsx2
-rw-r--r--src/client/views/presentationview/PresentationView.tsx5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/presentationview/PresentationElement.tsx b/src/client/views/presentationview/PresentationElement.tsx
index a74cbbd65..a84bbbf3c 100644
--- a/src/client/views/presentationview/PresentationElement.tsx
+++ b/src/client/views/presentationview/PresentationElement.tsx
@@ -56,7 +56,7 @@ export enum buttonIndex {
@observer
export default class PresentationElement extends React.Component<PresentationElementProps> {
- @observable selectedButtons: boolean[];
+ @observable private selectedButtons: boolean[];
constructor(props: PresentationElementProps) {
diff --git a/src/client/views/presentationview/PresentationView.tsx b/src/client/views/presentationview/PresentationView.tsx
index 97ec4e2fa..ad3a4bffe 100644
--- a/src/client/views/presentationview/PresentationView.tsx
+++ b/src/client/views/presentationview/PresentationView.tsx
@@ -453,10 +453,11 @@ export class PresentationView extends React.Component<PresViewProps> {
}
@action
- public RemoveDoc = (index: number) => {
+ public RemoveDoc = async (index: number) => {
const value = FieldValue(Cast(this.curPresentation.data, listSpec(Doc)));
if (value) {
- value.splice(index, 1);
+ let removedDoc = await value.splice(index, 1)[0];
+ this.presElementsMappings.delete(removedDoc);
}
}
@action