refactor(autocomplete): remove unnecessary map after getting all collection key (#2654)

* refactor(components): remove unnecessary map

* feat(changeset): remove unnecessary map after getting all collection keys
This commit is contained in:
աӄա 2024-04-15 03:10:39 +08:00 committed by GitHub
parent 4dd2605ac2
commit a1c112431f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
"@nextui-org/autocomplete": patch
---
Removed unnecessary map after getting all collection keys

View File

@ -181,7 +181,7 @@ export function useAutocomplete<T extends object>(originalProps: UseAutocomplete
state = {
...state,
...(isReadOnly && {
disabledKeys: new Set([...state.collection.getKeys()].map((k) => k)),
disabledKeys: new Set([...state.collection.getKeys()]),
}),
};