From 1a48ccf57ae43bc582dcd7be453e0ad217d38828 Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 7 Mar 2025 23:13:33 -0500 Subject: fixed following text hyperlinks to Docs. fixed using fieldinfos for DashFieldViews to get appropriate Schmema cell input. fixed dashFieldView to show correct input editor for field type. --- src/client/views/nodes/formattedText/DashFieldView.tsx | 11 +++++++---- src/client/views/nodes/formattedText/FormattedTextBox.tsx | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src/client/views/nodes/formattedText') diff --git a/src/client/views/nodes/formattedText/DashFieldView.tsx b/src/client/views/nodes/formattedText/DashFieldView.tsx index 18cf36603..e899b49bc 100644 --- a/src/client/views/nodes/formattedText/DashFieldView.tsx +++ b/src/client/views/nodes/formattedText/DashFieldView.tsx @@ -25,6 +25,7 @@ import './DashFieldView.scss'; import { FormattedTextBox } from './FormattedTextBox'; import { Node } from 'prosemirror-model'; import { EditorView } from 'prosemirror-view'; +import { DocumentOptions, FInfo } from '../../../documents/Documents'; @observer export class DashFieldViewMenu extends AntimodeMenu { @@ -151,6 +152,8 @@ export class DashFieldViewInternal extends ObservableReactComponent (this._dashDoc ? [this._dashDoc] : undefined); columnWidth = () => Math.min(this._props.tbox._props.PanelWidth(), Math.max(50, this._props.tbox._props.PanelWidth() - 100)); // try to leave room for the fieldKey + finfo = (fieldKey: string) => (new DocumentOptions() as Record)[fieldKey]; + // set the display of the field's value (checkbox for booleans, span of text for strings) @computed get fieldValueContent() { return !this._dashDoc ? null : ( @@ -165,7 +168,7 @@ export class DashFieldViewInternal extends ObservableReactComponent undefined : returnZero} selectedCells={this.selectedCells} selectedCol={returnZero} fieldKey={this._fieldKey} @@ -178,7 +181,7 @@ export class DashFieldViewInternal extends ObservableReactComponent diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index a0eb6067e..3844616fd 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -1652,7 +1652,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent