aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/presentationview/PresentationView.tsx
diff options
context:
space:
mode:
authorMohammad Amoush <mohammad_amoush@brown.edu>2019-07-05 15:41:17 -0400
committerMohammad Amoush <mohammad_amoush@brown.edu>2019-07-05 15:41:17 -0400
commit38a5856acd992657f735728aef91d459526364db (patch)
treea444fec4f36d0ea2e2116c122adf7ab56eaa409e /src/client/views/presentationview/PresentationView.tsx
parent118ca303bb18648451fe9c349c79594833d95001 (diff)
Reodering mostly done. Refactored button backUps, and wrote function to update groups. Gotta find where to call it!
Diffstat (limited to 'src/client/views/presentationview/PresentationView.tsx')
-rw-r--r--src/client/views/presentationview/PresentationView.tsx12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/client/views/presentationview/PresentationView.tsx b/src/client/views/presentationview/PresentationView.tsx
index cdd059cab..ba248a8aa 100644
--- a/src/client/views/presentationview/PresentationView.tsx
+++ b/src/client/views/presentationview/PresentationView.tsx
@@ -421,7 +421,17 @@ export class PresentationView extends React.Component<PresViewProps> {
//removing it from the backUp of selected Buttons
let castedList = Cast(this.presButtonBackUp.selectedButtonDocs, listSpec(Doc));
if (castedList) {
- castedList.splice(index, 1);
+ castedList.forEach(async (doc, indexOfDoc) => {
+ let curDoc = await doc;
+ let curDocId = StrCast(curDoc.docId);
+ if (curDocId === removedDoc[Id]) {
+ if (castedList) {
+ castedList.splice(indexOfDoc, 1);
+ return;
+ }
+ }
+ });
+
}
//removing it from the backup of groups