diff options
| author | bob <bcz@cs.brown.edu> | 2020-02-27 17:05:39 -0500 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2020-02-27 17:05:39 -0500 |
| commit | 8190b6557065828e3a5e7a6505c0963a433e27d1 (patch) | |
| tree | 75299b0ce8117e83e13b741fc9a39d36b20b99c1 /src/client/views/collections/CollectionStackingView.tsx | |
| parent | 3c48667061fb417e3a7657a1951659d25b453a9f (diff) | |
adding colors to schema view will update the enumerated colors used by text boxes in freeformview.
Diffstat (limited to 'src/client/views/collections/CollectionStackingView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionStackingView.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionStackingView.tsx b/src/client/views/collections/CollectionStackingView.tsx index a1cc21319..4495e8248 100644 --- a/src/client/views/collections/CollectionStackingView.tsx +++ b/src/client/views/collections/CollectionStackingView.tsx @@ -24,6 +24,7 @@ import "./CollectionStackingView.scss"; import { CollectionStackingViewFieldColumn } from "./CollectionStackingViewFieldColumn"; import { CollectionSubView } from "./CollectionSubView"; import { CollectionViewType } from "./CollectionView"; +import { Docs } from "../../documents/Documents"; @observer export class CollectionStackingView extends CollectionSubView(doc => doc) { @@ -348,7 +349,9 @@ export class CollectionStackingView extends CollectionSubView(doc => doc) { @action addGroup = (value: string) => { if (value && this.sectionHeaders) { - this.sectionHeaders.push(new SchemaHeaderField(value)); + const schemaHdrField = new SchemaHeaderField(value); + this.sectionHeaders.push(schemaHdrField); + Doc.addEnumerationToTextField(undefined, this.sectionFilter, [Docs.Create.TextDocument(value, { title: value, _backgroundColor: schemaHdrField.color })]); return true; } return false; |
