@@ -69,17 +69,15 @@ export const Select = <T extends Item>({
|
|||||||
const inputRef = useRef<HTMLInputElement>(null)
|
const inputRef = useRef<HTMLInputElement>(null)
|
||||||
const { ref: parentModalRef } = useParentModal()
|
const { ref: parentModalRef } = useParentModal()
|
||||||
|
|
||||||
const filteredItems = (
|
const filteredItems = isTouched
|
||||||
isTouched
|
? [
|
||||||
? [
|
...(items ?? []).filter((item) =>
|
||||||
...(items ?? []).filter((item) =>
|
getItemLabel(item)
|
||||||
getItemLabel(item)
|
.toLowerCase()
|
||||||
.toLowerCase()
|
.includes((inputValue ?? '').toLowerCase())
|
||||||
.includes((inputValue ?? '').toLowerCase())
|
),
|
||||||
),
|
]
|
||||||
]
|
: items ?? []
|
||||||
: items ?? []
|
|
||||||
).slice(0, 50)
|
|
||||||
|
|
||||||
const closeDropdown = () => {
|
const closeDropdown = () => {
|
||||||
onClose()
|
onClose()
|
||||||
|
|||||||
Reference in New Issue
Block a user