fix(autocomplete): maximum update depth exceeded in autocomplete (#3175)

This commit is contained in:
աӄա 2024-06-04 20:19:17 +08:00 committed by GitHub
parent f3fdb7b666
commit 2069a7a9d0
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
---
Fix maximum update depth exceeded on Autocomplete component (#3094)

View File

@ -318,7 +318,7 @@ export function useAutocomplete<T extends object>(originalProps: UseAutocomplete
state.setSelectedKey(key);
state.setInputValue(item.textValue);
}
}, [inputRef.current, state]);
}, [inputRef.current]);
// apply the same with to the popover as the select
useEffect(() => {