aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/src/ValuePicker
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/ValuePicker')
-rw-r--r--app/src/ValuePicker/index.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/src/ValuePicker/index.js b/app/src/ValuePicker/index.js
index a98b6a3..d85b5c6 100644
--- a/app/src/ValuePicker/index.js
+++ b/app/src/ValuePicker/index.js
@@ -31,7 +31,6 @@ function ValuePicker (props) {
const [highlighted, setHighlighted] = useState(null)
const [showAll, setShowAll] = useState(false)
-
const results = useMemo(() => {
const options = { key: searchKey, limit: 30 }
const filtered = fuzzysort.go(query, choices, options)
@@ -61,7 +60,7 @@ function ValuePicker (props) {
}, [onSelect])
const handleClickOutside = useMemo(() => function(event) {
- if (listRef.current?.contains(event.target)) {
+ if (!listRef.current.contains(event.target)) {
onCancel()
}
}, [listRef, onCancel])