aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionSchemaHeaders.tsx
diff options
context:
space:
mode:
authoranika-ahluwalia <anika.ahluwalia@gmail.com>2020-06-27 02:37:22 -0500
committeranika-ahluwalia <anika.ahluwalia@gmail.com>2020-06-27 02:37:22 -0500
commitfa4612e7dfeaecc09e205c5d6fa37743d23f9298 (patch)
tree97c21f5c41297f188dbcb10fd35e191932252016 /src/client/views/collections/CollectionSchemaHeaders.tsx
parentf73c7fb72780535441033167214275e329de2dd8 (diff)
moved sorting into header
Diffstat (limited to 'src/client/views/collections/CollectionSchemaHeaders.tsx')
-rw-r--r--src/client/views/collections/CollectionSchemaHeaders.tsx15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionSchemaHeaders.tsx b/src/client/views/collections/CollectionSchemaHeaders.tsx
index 8494f3dca..096b45bee 100644
--- a/src/client/views/collections/CollectionSchemaHeaders.tsx
+++ b/src/client/views/collections/CollectionSchemaHeaders.tsx
@@ -358,13 +358,19 @@ export class KeysDropdown extends React.Component<KeysDropdownProps> {
this.props.existingKeys.findIndex(key => key.toUpperCase() === this._searchTerm.toUpperCase()) > -1;
const options = keyOptions.map(key => {
- return <div key={key} className="key-option" style={{ border: "1px solid lightgray" }}
+ return <div key={key} className="key-option" style={{
+ border: "1px solid lightgray",
+ maxWidth: this.props.width, overflowX: "hidden"
+ }}
onPointerDown={e => e.stopPropagation()} onClick={() => { this.onSelect(key); this.setSearchTerm(""); }}>{key}</div>;
});
// if search term does not already exist as a group type, give option to create new group type
if (!exactFound && this._searchTerm !== "" && this.props.canAddNew) {
- options.push(<div key={""} className="key-option" style={{ border: "1px solid lightgray" }}
+ options.push(<div key={""} className="key-option" style={{
+ border: "1px solid lightgray",
+ maxWidth: this.props.width, overflowX: "hidden"
+ }}
onClick={() => { this.onSelect(this._searchTerm); this.setSearchTerm(""); }}>
Create "{this._searchTerm}" key</div>);
}
@@ -382,7 +388,10 @@ export class KeysDropdown extends React.Component<KeysDropdownProps> {
//this._inputRef.current!.select();
e.stopPropagation();
}} onFocus={this.onFocus} onBlur={this.onBlur}></input>
- <div className="keys-options-wrapper" style={{ backgroundColor: "white" }}
+ <div className="keys-options-wrapper" style={{
+ backgroundColor: "white",
+ width: this.props.width, overflowX: "hidden"
+ }}
onPointerEnter={this.onPointerEnter} onPointerLeave={this.onPointerOut}>
{this.renderOptions()}
</div>