mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
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:
parent
4dd2605ac2
commit
a1c112431f
5
.changeset/silly-pants-type.md
Normal file
5
.changeset/silly-pants-type.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"@nextui-org/autocomplete": patch
|
||||
---
|
||||
|
||||
Removed unnecessary map after getting all collection keys
|
||||
@ -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()]),
|
||||
}),
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user