diff options
Diffstat (limited to 'src/client/views/collections/collectionSchema/SchemaTableCell.tsx')
| -rw-r--r-- | src/client/views/collections/collectionSchema/SchemaTableCell.tsx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx index f036ff843..941402d6d 100644 --- a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx +++ b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx @@ -1,6 +1,6 @@ /* eslint-disable no-use-before-define */ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { Popup, Size, Type } from 'browndash-components'; +import { Popup, Size, Type } from '@dash/components'; import { action, computed, makeObservable, observable } from 'mobx'; import { observer } from 'mobx-react'; import { extname } from 'path'; @@ -102,6 +102,7 @@ export class SchemaTableCell extends ObservableReactComponent<SchemaTableCellPro return true; }; public static renderProps(props: SchemaTableCellProps) { + // eslint-disable-next-line @typescript-eslint/no-unused-vars const { Document, fieldKey, getFinfo, columnWidth, isRowActive } = props; let protoCount = 0; let doc: Doc | undefined = Document; @@ -136,7 +137,7 @@ export class SchemaTableCell extends ObservableReactComponent<SchemaTableCellPro PanelHeight: props.rowHeight, rootSelected: props.rootSelected, }; - const readOnly = getFinfo(fieldKey)?.readOnly ?? false; + const readOnly = false; // getFinfo(fieldKey)?.readOnly ?? false; const cursor = !readOnly ? 'text' : 'default'; const pointerEvents: 'all' | 'none' = !readOnly && isRowActive() ? 'all' : 'none'; return { color, textDecoration, fieldProps, cursor, pointerEvents }; @@ -232,9 +233,8 @@ export class SchemaTableCell extends ObservableReactComponent<SchemaTableCellPro if (typeof cellValue === 'number') return ColumnType.Any; if (typeof cellValue === 'string' && columnTypeStr !== FInfoFieldType.enumeration) return ColumnType.Any; if (typeof cellValue === 'boolean') return ColumnType.Boolean; - if (columnTypeStr && columnTypeStr in FInfotoColType) return FInfotoColType[columnTypeStr]; - return ColumnType.Any; + return columnTypeStr ? FInfotoColType[columnTypeStr] : ColumnType.Any; } get content() { @@ -402,7 +402,7 @@ export class SchemaDateCell extends ObservableReactComponent<SchemaTableCellProp </div> {pointerEvents === 'none' ? null : ( <Popup - icon={<FontAwesomeIcon size="sm" icon="caret-down" />} + icon={<FontAwesomeIcon size="xs" icon="caret-down" />} size={Size.XSMALL} type={Type.TERT} color={SnappingManager.userColor} @@ -449,6 +449,7 @@ export class SchemaBoolCell extends ObservableReactComponent<SchemaTableCellProp return ( <div className="schemaBoolCell" style={{ display: 'flex', color, textDecoration, cursor, pointerEvents }}> <input + onPointerDown={e => e.stopPropagation()} style={{ marginRight: 4 }} type="checkbox" checked={BoolCast(this._props.Document[this._props.fieldKey])} |
