aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DataVizBox/DataVizBox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/DataVizBox/DataVizBox.tsx')
-rw-r--r--src/client/views/nodes/DataVizBox/DataVizBox.tsx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/views/nodes/DataVizBox/DataVizBox.tsx b/src/client/views/nodes/DataVizBox/DataVizBox.tsx
index cef7f62b1..8e9680e38 100644
--- a/src/client/views/nodes/DataVizBox/DataVizBox.tsx
+++ b/src/client/views/nodes/DataVizBox/DataVizBox.tsx
@@ -33,7 +33,7 @@ import { LineChart } from './components/LineChart';
import { PieChart } from './components/PieChart';
import { TableBox } from './components/TableBox';
import { LinkManager } from '../../../util/LinkManager';
-import { DataVizTemplateInfo, DataVizTemplateLayout, DocCreatorMenu, LayoutType } from './DocCreatorMenu';
+import { DataVizTemplateInfo, DataVizTemplateLayout, DocCreatorMenu, LayoutType, TemplateFieldType } from './DocCreatorMenu';
import { CollectionFreeFormView, MarqueeView } from '../../collections/collectionFreeForm';
import { PrefetchProxy } from '../../../../fields/Proxy';
import { AclAdmin, AclAugment, AclEdit } from '../../../../fields/DocSymbols';
@@ -65,7 +65,7 @@ export class DataVizBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
@observable _specialHighlightedRow: number | undefined = undefined;
@observable GPTSummary: ObservableMap<string, string> | undefined = undefined;
@observable colDescriptions: ObservableMap<string, string> = new ObservableMap();
- @observable fieldTypes: ObservableMap<string, string> = new ObservableMap();
+ @observable fieldTypes: ObservableMap<string, TemplateFieldType> = new ObservableMap();
@observable _GPTLoading: boolean = false;
constructor(props: FieldViewProps) {
@@ -147,7 +147,7 @@ export class DataVizBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
this._specialHighlightedRow = row;
}
- @action setFieldType = (field: string, type: string) => {
+ @action setFieldType = (field: string, type: TemplateFieldType) => {
this.fieldTypes?.set(field, type);
}
@@ -159,8 +159,8 @@ export class DataVizBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
}
}
- getFieldType = (field: string): string => {
- return this.fieldTypes?.get(field) ?? '';
+ getFieldType = (field: string): TemplateFieldType => {
+ return this.fieldTypes?.get(field) ?? TemplateFieldType.UNSET;
}
getFieldDescription = (field: string): string => {