aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionSchemaView.tsx
diff options
context:
space:
mode:
authoranika-ahluwalia <anika.ahluwalia@gmail.com>2020-06-25 22:33:50 -0500
committeranika-ahluwalia <anika.ahluwalia@gmail.com>2020-06-25 22:33:50 -0500
commit4b68d25cc3718a6b9fffdd60d04707cbcc8fc2b2 (patch)
tree9b93d318a3aa87f7ad8efcf7521ff4df3f230969 /src/client/views/collections/CollectionSchemaView.tsx
parent8292aae00bb7fd7716110df21faafa53fd35738d (diff)
adjusting menu trigger
Diffstat (limited to 'src/client/views/collections/CollectionSchemaView.tsx')
-rw-r--r--src/client/views/collections/CollectionSchemaView.tsx22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx
index 9cd13058f..900949b94 100644
--- a/src/client/views/collections/CollectionSchemaView.tsx
+++ b/src/client/views/collections/CollectionSchemaView.tsx
@@ -299,20 +299,24 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
@action
closeHeader = () => { this._headerOpen = false; }
+ renderKeysDropDown = (col: any) => {
+ return <KeysDropdown
+ keyValue={col.heading}
+ possibleKeys={this.possibleKeys}
+ existingKeys={this.columns.map(c => c.heading)}
+ canAddNew={true}
+ addNew={false}
+ onSelect={this.changeColumns}
+ setIsEditing={this.setHeaderIsEditing}
+ />;
+ }
+
renderContent = (col: any) => {
return (
<div className="collectionSchema-header-menuOptions">
<div className="collectionSchema-headerMenu-group">
<label>Key:</label>
- <KeysDropdown
- keyValue={col.heading}
- possibleKeys={this.possibleKeys}
- existingKeys={this.columns.map(c => c.heading)}
- canAddNew={true}
- addNew={false}
- onSelect={this.changeColumns}
- setIsEditing={this.setHeaderIsEditing}
- />
+ {this.renderKeysDropDown(col)}
</div>
{false ? <></> :
<>