diff options
| author | Stanley Yip <33562077+yipstanley@users.noreply.github.com> | 2019-07-27 22:31:22 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-27 22:31:22 +0000 |
| commit | abbf48841a813974813bb0394725e35288b06484 (patch) | |
| tree | 906646e5f5deb833e493cff26e0a0a3cccf6bec8 /src/client/views/nodes/LinkEditor.tsx | |
| parent | 3b0af6ff470539fd0a25b2ab975195ff9e269b4a (diff) | |
| parent | f02e8416239b612f40dd2c65d6ca9173e81fb1a9 (diff) | |
Merge pull request #218 from browngraphicslab/schema_view_improvements_2
Schema view improvements 2
Diffstat (limited to 'src/client/views/nodes/LinkEditor.tsx')
| -rw-r--r-- | src/client/views/nodes/LinkEditor.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/LinkEditor.tsx b/src/client/views/nodes/LinkEditor.tsx index afde85b69..0ea948c81 100644 --- a/src/client/views/nodes/LinkEditor.tsx +++ b/src/client/views/nodes/LinkEditor.tsx @@ -11,6 +11,7 @@ import { faArrowLeft, faEllipsisV, faTable, faTrash, faCog, faExchangeAlt, faTim import { library } from "@fortawesome/fontawesome-svg-core"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { SetupDrag } from "../../util/DragManager"; +import { SchemaHeaderField, RandomPastel } from "../../../new_fields/SchemaHeaderField"; library.add(faArrowLeft, faEllipsisV, faTable, faTrash, faCog, faExchangeAlt, faTimes, faPlus); @@ -289,7 +290,7 @@ export class LinkGroupEditor extends React.Component<LinkGroupEditorProps> { 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>(); |
