aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionSchemaView.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-04-30 13:34:30 -0400
committerbob <bcz@cs.brown.edu>2019-04-30 13:34:30 -0400
commitf59503c26b165b71cf3fa6fe4c1b7a14cef2d441 (patch)
treee079e726759f5f0e8d08783829860bd05b5f6e99 /src/client/views/collections/CollectionSchemaView.tsx
parente013b7b146f91b0ffbc26e3770f5f90f417da60b (diff)
parent86e89178628a27a91665ad835046e536bdb89729 (diff)
Merge branch 'master' into newDocs
Diffstat (limited to 'src/client/views/collections/CollectionSchemaView.tsx')
-rw-r--r--src/client/views/collections/CollectionSchemaView.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx
index 58d20819b..6add6ada8 100644
--- a/src/client/views/collections/CollectionSchemaView.tsx
+++ b/src/client/views/collections/CollectionSchemaView.tsx
@@ -2,7 +2,7 @@ import React = require("react");
import { library } from '@fortawesome/fontawesome-svg-core';
import { faCog, faPlus } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
-import { action, computed, observable, untracked } from "mobx";
+import { action, computed, observable, untracked, runInAction } from "mobx";
import { observer } from "mobx-react";
import ReactTable, { CellInfo, ComponentPropsGetterR, ReactTableDefaults } from "react-table";
import { MAX_ROW_HEIGHT } from '../../views/globalCssVariables.scss';
@@ -58,7 +58,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
@observable _newKeyName: string = "";
@computed get splitPercentage() { return NumCast(this.props.Document.schemaSplitPercentage); }
- @computed get columns() { return Cast(this.props.Document.columns, listSpec("string"), []); }
+ @computed get columns() { return Cast(this.props.Document.schemaColumns, listSpec("string"), []); }
@computed get borderWidth() { return Number(COLLECTION_BORDER_WIDTH); }
renderCell = (rowProps: CellInfo) => {
@@ -156,9 +156,9 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
@action
toggleKey = (key: string) => {
- let list = Cast(this.props.Document.columns, listSpec("string"));
+ let list = Cast(this.props.Document.schemaColumns, listSpec("string"));
if (list === undefined) {
- this.props.Document.columns = list = new List<string>([key]);
+ this.props.Document.schemaColumns = list = new List<string>([key]);
} else {
const index = list.indexOf(key);
if (index === -1) {