From d38cf2d7f02fb1d0b26ea410f5ed3a1ba67c7666 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 17 Apr 2023 13:53:24 +0100 Subject: [PATCH] Fix row heights with sticky column --- .../src/components/sheet/cells/RelationshipCell.svelte | 8 ++++---- .../src/components/sheet/layout/StickyColumn.svelte | 7 +++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/frontend-core/src/components/sheet/cells/RelationshipCell.svelte b/packages/frontend-core/src/components/sheet/cells/RelationshipCell.svelte index e1e92c31ec..a6360c1bae 100644 --- a/packages/frontend-core/src/components/sheet/cells/RelationshipCell.svelte +++ b/packages/frontend-core/src/components/sheet/cells/RelationshipCell.svelte @@ -142,7 +142,7 @@ if (candidateIndex == null) { candidateIndex = 0 } else { - candidateIndex = Math.min(results.length - 1, candidateIndex + 1) + candidateIndex = Math.min(searchResults.length - 1, candidateIndex + 1) } } else if (e.key === "ArrowUp") { // Select previous result on up array @@ -154,8 +154,8 @@ } } else if (e.key === "Enter") { // Toggle the highlighted result on enter press - if (candidateIndex != null && results[candidateIndex] != null) { - toggleRow(results[candidateIndex]) + if (candidateIndex != null && searchResults[candidateIndex] != null) { + toggleRow(searchResults[candidateIndex]) } } return true @@ -289,7 +289,7 @@ min-height: var(--row-height); max-height: var(--row-height); overflow: hidden; - --max-relationship-height: 92px; + --max-relationship-height: 120px; } .wrapper.focused { position: absolute; diff --git a/packages/frontend-core/src/components/sheet/layout/StickyColumn.svelte b/packages/frontend-core/src/components/sheet/layout/StickyColumn.svelte index edadb4987f..67a92b5288 100644 --- a/packages/frontend-core/src/components/sheet/layout/StickyColumn.svelte +++ b/packages/frontend-core/src/components/sheet/layout/StickyColumn.svelte @@ -220,6 +220,13 @@ justify-content: center; align-items: center; } + .checkbox :global(.spectrum-Checkbox) { + min-height: 0; + height: 20px; + } + .checkbox :global(.spectrum-Checkbox-box) { + margin: 3px 0 0 0; + } .number { color: var(--spectrum-global-color-gray-500); }