2
0

🚸 Remove 50 select items initial hard limit

Closes #1348
This commit is contained in:
Baptiste Arnaud
2024-03-13 10:20:52 +01:00
parent eaaa840cbf
commit cbfc980cf5

View File

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