From db7e5ed3ac36f05787b809e2ae03c94f310ef3e4 Mon Sep 17 00:00:00 2001 From: Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> Date: Fri, 28 Jun 2024 19:26:23 -0400 Subject: colkeys menu width conforms to column with --- .../collections/collectionSchema/CollectionSchemaView.scss | 9 +-------- .../collections/collectionSchema/CollectionSchemaView.tsx | 13 ++----------- 2 files changed, 3 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.scss b/src/client/views/collections/collectionSchema/CollectionSchemaView.scss index 425b67fa9..e3f3dafab 100644 --- a/src/client/views/collections/collectionSchema/CollectionSchemaView.scss +++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.scss @@ -51,8 +51,6 @@ .schema-filter-menu { background: $light-gray; position: absolute; - min-width: 150px; - max-width: 300px; max-height: 300px; display: flex; overflow: hidden; @@ -60,11 +58,6 @@ align-items: flex-start; z-index: 5; - .schema-key-search-input { - width: calc(100% - 20px); - margin: 10px; - } - .schema-search-result { cursor: pointer; padding: 5px 10px; @@ -106,7 +99,7 @@ .schema-key-list { width: 100%; - max-height: 300px; + max-height: 250px; overflow-y: auto; } diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx index ee693078f..a3bc537d2 100644 --- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx +++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx @@ -154,7 +154,6 @@ export class CollectionSchemaView extends CollectionSubView() { ); const totalWidth = widths.reduce((sum, width) => sum + width, 0); - // If the total width of all columns is not the width of the schema table minus the width of the row menu, resize them appropriately if (totalWidth !== this.tableWidth - CollectionSchemaView._rowMenuWidth) { return widths.map(w => (w / totalWidth) * (this.tableWidth - CollectionSchemaView._rowMenuWidth)); } @@ -1133,15 +1132,7 @@ export class CollectionSchemaView extends CollectionSubView() { @computed get renderColumnMenu() { const x = this._columnMenuIndex! === -1 ? 0 : this.displayColumnWidths.reduce((total, curr, index) => total + (index < this._columnMenuIndex! ? curr : 0), CollectionSchemaView._rowMenuWidth); return ( -
- {this.keysDropdown} -
- ); - } - - get renderKeysMenu() { - return ( -
+
{this.keysDropdown}
); @@ -1184,7 +1175,7 @@ export class CollectionSchemaView extends CollectionSubView() { @computed get renderFilterMenu() { const x = this.displayColumnWidths.reduce((total, curr, index) => total + (index < this._filterColumnIndex! ? curr : 0), CollectionSchemaView._rowMenuWidth); return ( -
+
e.stopPropagation()} /> {this.renderFilterOptions}