aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
diff options
context:
space:
mode:
authorNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-06-10 04:01:01 -0400
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-06-10 04:01:01 -0400
commit99b0ce24e4d56100746016995c20f9bb9c109072 (patch)
tree733ee6074eb67ebaf4a5a17fed471ec092dfbf40 /src/client/views/collections/collectionSchema/SchemaRowBox.tsx
parent97977e7156eb852c20422fa995bbf96529dfb4e5 (diff)
adding/removing children from collection works (probably buggy); backspace delete broken
Diffstat (limited to 'src/client/views/collections/collectionSchema/SchemaRowBox.tsx')
-rw-r--r--src/client/views/collections/collectionSchema/SchemaRowBox.tsx9
1 files changed, 4 insertions, 5 deletions
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 =>