diff options
| author | yipstanley <stanley_yip@brown.edu> | 2019-07-27 20:12:10 -0400 |
|---|---|---|
| committer | yipstanley <stanley_yip@brown.edu> | 2019-07-27 20:12:10 -0400 |
| commit | f62c275090a0b227a5f77ed14e0a6c7d19d20052 (patch) | |
| tree | 6e72aacb0ca2c2527c6dfc6e19900030eed57111 /src/client/views/nodes/LinkMenuGroup.tsx | |
| parent | d53ad748d90ca1c863a7ef52d0835573ce967a54 (diff) | |
| parent | 5cbbd71ceb98a554109ac2a4469a02b28a836e61 (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into pdf_paste_backlink
Diffstat (limited to 'src/client/views/nodes/LinkMenuGroup.tsx')
| -rw-r--r-- | src/client/views/nodes/LinkMenuGroup.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/LinkMenuGroup.tsx b/src/client/views/nodes/LinkMenuGroup.tsx index ae97bed2f..3637807ad 100644 --- a/src/client/views/nodes/LinkMenuGroup.tsx +++ b/src/client/views/nodes/LinkMenuGroup.tsx @@ -14,6 +14,7 @@ import { Docs } from "../../documents/Documents"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { UndoManager } from "../../util/UndoManager"; import { StrCast } from "../../../new_fields/Types"; +import { SchemaHeaderField, RandomPastel } from "../../../new_fields/SchemaHeaderField"; interface LinkMenuGroupProps { sourceDoc: Doc; @@ -70,7 +71,7 @@ export class LinkMenuGroup extends React.Component<LinkMenuGroupProps> { let keys = LinkManager.Instance.getMetadataKeysInGroup(groupType); let index = keys.indexOf(""); if (index > -1) keys.splice(index, 1); - let cols = ["anchor1", "anchor2", ...[...keys]]; + let cols = ["anchor1", "anchor2", ...[...keys]].map(c => new SchemaHeaderField(c)); let docs: Doc[] = LinkManager.Instance.getAllMetadataDocsInGroup(groupType); let createTable = action(() => Docs.Create.SchemaDocument(cols, docs, { width: 500, height: 300, title: groupType + " table" })); let ref = React.createRef<HTMLDivElement>(); |
