From 99b0ce24e4d56100746016995c20f9bb9c109072 Mon Sep 17 00:00:00 2001
From: Nathan-SR <144961007+Nathan-SR@users.noreply.github.com>
Date: Mon, 10 Jun 2024 04:01:01 -0400
Subject: adding/removing children from collection works (probably buggy);
 backspace delete broken

---
 src/client/views/collections/collectionSchema/SchemaRowBox.tsx | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

(limited to 'src/client/views/collections/collectionSchema/SchemaRowBox.tsx')

diff --git a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
index 665704de1..cdd47f644 100644
--- a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
+++ b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
@@ -60,7 +60,7 @@ export class SchemaRowBox extends ViewBoxBaseComponent<SchemaRowBoxProps>() {
         ContextMenu.Instance.clearItems();
         ContextMenu.Instance.addItem({
             description: `Close doc`,
-            event: () => this._props.removeDocument?.(this.Document),
+            event: () => this.schemaView.removeDoc(this.Document),
             icon: 'minus',
         });
         ContextMenu.Instance.addItem({
@@ -74,13 +74,12 @@ export class SchemaRowBox extends ViewBoxBaseComponent<SchemaRowBoxProps>() {
             icon: 'magnifying-glass',
         });
         const childDocs = DocListCast(this.Document[Doc.LayoutFieldKey(this.Document)])
-        if (this.Document['type'] === 'collection' && childDocs.length) {
+        if (this.Document.type === 'collection' && childDocs.length) {
                 ContextMenu.Instance.addItem({
                 description: this.Document._childrenSharedWithSchema ? 'Remove children from schema' : 'Add children to schema',
                 event: () => {
                     this.Document._childrenSharedWithSchema = !this.Document._childrenSharedWithSchema; 
-                    this.Document._childrenSharedWithSchema ? 
-                    this.schemaView.addDocsFromOtherCollection(childDocs) : this.schemaView.removeDocsFromOtherCollection(childDocs);
+                    this.Document._childrenSharedWithSchema ? this.schemaView.addDocsFromOtherCollection(childDocs) : this.schemaView.removeDocsFromOtherCollection(childDocs);
                 },
                 icon: this.Document._childrenSharedWithSchema ? 'minus' : 'plus',
             });
@@ -115,7 +114,7 @@ export class SchemaRowBox extends ViewBoxBaseComponent<SchemaRowBoxProps>() {
                     }}>
                     <IconButton
                         tooltip="Open actions menu"
-                        icon={ <FontAwesomeIcon icon="list" size='lg'/>}
+                        icon={ <FontAwesomeIcon icon="caret-right" size='lg'/>}
                         size={Size.XSMALL}
                         color={'black'}
                         onPointerDown={e =>
-- 
cgit v1.2.3-70-g09d2

