summaryrefslogtreecommitdiff
path: root/extension/react-app/src/components/ComboBox.tsx
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-07-17 00:00:31 -0700
committerNate Sesti <sestinj@gmail.com>2023-07-17 00:00:31 -0700
commit88c1f16c597e0a55271e622a5283562ccb7a80a1 (patch)
treeccf6d12e382b8cf3a3735615e35981c2dd0af7c5 /extension/react-app/src/components/ComboBox.tsx
parentc3a5010c7e2b49022c08f8fec113d4fdf21e0438 (diff)
downloadsncontinue-88c1f16c597e0a55271e622a5283562ccb7a80a1.tar.gz
sncontinue-88c1f16c597e0a55271e622a5283562ccb7a80a1.tar.bz2
sncontinue-88c1f16c597e0a55271e622a5283562ccb7a80a1.zip
only show delete when only one range selected
Diffstat (limited to 'extension/react-app/src/components/ComboBox.tsx')
-rw-r--r--extension/react-app/src/components/ComboBox.tsx2
1 files changed, 2 insertions, 0 deletions
diff --git a/extension/react-app/src/components/ComboBox.tsx b/extension/react-app/src/components/ComboBox.tsx
index 773fcf72..dbebd534 100644
--- a/extension/react-app/src/components/ComboBox.tsx
+++ b/extension/react-app/src/components/ComboBox.tsx
@@ -218,6 +218,7 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => {
? "Editing such a large range may be slow"
: undefined
}
+ onlyShowDelete={highlightedCodeSections.length <= 1}
editing={section.editing}
pinned={section.pinned}
index={idx}
@@ -334,6 +335,7 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => {
})}
showAbove={showAbove()}
ulHeightPixels={ulRef.current?.getBoundingClientRect().height || 0}
+ hidden={!downshiftProps.isOpen || items.length === 0}
>
{downshiftProps.isOpen &&
items.map((item, index) => (