diff options
| author | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-09-29 19:55:40 -0400 |
|---|---|---|
| committer | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-09-29 19:55:40 -0400 |
| commit | cf45abf8ada938caddb226c825166d4acdee3086 (patch) | |
| tree | 135f601da07aa62185221fd79f4d196e094121b7 /src/client/views/collections/collectionSchema/SchemaRowBox.tsx | |
| parent | d8a43b76f101a2f38ef1e3e9cbf8ec036468481d (diff) | |
linting
Diffstat (limited to 'src/client/views/collections/collectionSchema/SchemaRowBox.tsx')
| -rw-r--r-- | src/client/views/collections/collectionSchema/SchemaRowBox.tsx | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx index b928a5c67..a8a4ef2c2 100644 --- a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx +++ b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx @@ -3,27 +3,21 @@ import { computed, makeObservable, observable } from 'mobx'; import { observer } from 'mobx-react'; import { computedFn } from 'mobx-utils'; import * as React from 'react'; -import { CgClose, CgLock, CgLockUnlock, CgMenu } from 'react-icons/cg'; -import { FaExternalLinkAlt } from 'react-icons/fa'; import { returnFalse, setupMoveUpEvents } from '../../../../ClientUtils'; import { emptyFunction } from '../../../../Utils'; -import { Doc, DocListCast, FieldResult } from '../../../../fields/Doc'; +import { Doc } from '../../../../fields/Doc'; import { BoolCast } from '../../../../fields/Types'; import { Transform } from '../../../util/Transform'; import { undoable } from '../../../util/UndoManager'; import { ViewBoxBaseComponent } from '../../DocComponent'; -import { Colors } from '../../global/globalEnums'; import { FieldView, FieldViewProps } from '../../nodes/FieldView'; import { OpenWhere } from '../../nodes/OpenWhere'; import { CollectionSchemaView } from './CollectionSchemaView'; import './CollectionSchemaView.scss'; import { SchemaTableCell } from './SchemaTableCell'; import { ContextMenu } from '../../ContextMenu'; -import { CollectionFreeFormView } from '../collectionFreeForm'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { IconProp } from '@fortawesome/fontawesome-svg-core'; -import { infoState } from '../collectionFreeForm/CollectionFreeFormInfoState'; -import { TbShieldX } from 'react-icons/tb'; /** * The SchemaRowBox renders a doc as a row of cells, with each cell representing @@ -78,16 +72,17 @@ export class SchemaRowBox extends ViewBoxBaseComponent<SchemaRowBoxProps>() { event: () => this.schemaView.removeDoc(this.Document), icon: 'minus', }); - const childDocs = DocListCast(this.Document[Doc.LayoutFieldKey(this.Document)]) - 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; - }, - icon: this.Document._childrenSharedWithSchema ? 'minus' : 'plus', - }); - } + // Defunct option to add child docs of collections to the main schema + // const childDocs = DocListCast(this.Document[Doc.LayoutFieldKey(this.Document)]) + // 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; + // }, + // icon: this.Document._childrenSharedWithSchema ? 'minus' : 'plus', + // }); + // } ContextMenu.Instance.displayMenu(x, y, undefined, false); } |
