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,8 +69,7 @@ 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)
@@ -79,7 +78,6 @@ export const Select = <T extends Item>({
), ),
] ]
: items ?? [] : items ?? []
).slice(0, 50)
const closeDropdown = () => { const closeDropdown = () => {
onClose() onClose()