aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-04-27 20:28:31 -0400
committerbobzel <zzzman@gmail.com>2023-04-27 20:28:31 -0400
commit51fbd118b00f4baebeed989bcd33000ac345ec8c (patch)
treeed6cbec0ac0d836f31e7dc81c6651a36f53fdf3c /src
parentba5b687011526188bb024ddf37c254aaf285c06d (diff)
fixed retrieving fields in schema view.
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/collectionSchema/CollectionSchemaView.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
index 50a91a60a..3dff8d769 100644
--- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
+++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
@@ -1,6 +1,6 @@
import React = require('react');
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
-import { action, computed, observable, ObservableMap, observe, reaction, trace, untracked } from 'mobx';
+import { action, computed, observable, ObservableMap, observe, trace } from 'mobx';
import { observer } from 'mobx-react';
import { computedFn } from 'mobx-utils';
import { Doc, DocListCast, Field, NumListCast, StrListCast } from '../../../../fields/Doc';
@@ -16,6 +16,7 @@ import { SelectionManager } from '../../../util/SelectionManager';
import { undoBatch } from '../../../util/UndoManager';
import { ContextMenu } from '../../ContextMenu';
import { EditableView } from '../../EditableView';
+import { Colors } from '../../global/globalEnums';
import { DocFocusOptions, DocumentView } from '../../nodes/DocumentView';
import { FormattedTextBox } from '../../nodes/formattedText/FormattedTextBox';
import { KeyValueBox } from '../../nodes/KeyValueBox';
@@ -24,7 +25,6 @@ import { CollectionSubView } from '../CollectionSubView';
import './CollectionSchemaView.scss';
import { SchemaColumnHeader } from './SchemaColumnHeader';
import { SchemaRowBox } from './SchemaRowBox';
-import { Colors } from '../../global/globalEnums';
export enum ColumnType {
Number,
@@ -134,7 +134,7 @@ export class CollectionSchemaView extends CollectionSubView() {
// prettier-ignore
(change as any).added.forEach((doc: Doc) => // for each document added
Doc.GetAllPrototypes(doc).forEach(proto => // for all of its prototypes (and itself)
- Object.keys(proto).forEach(action(key => // check if any of its keys are new, and add them
+ Object.keys(proto.value as Doc).forEach(action(key => // check if any of its keys are new, and add them
!this.fieldInfos.get(key) && this.fieldInfos.set(key, new FInfo(''))))));
break;
case 'update': //let oldValue = change.oldValue; // fill this in if the entire child list will ever be reassigned with a new list