Skip to content

Conversation

@dwene
Copy link
Contributor

@dwene dwene commented Jun 29, 2023

infinite useEffect loop was caused when input value was is an array. Using lodash isEqual to compare arrays for equality fixed it

@dwene dwene requested review from jaredhill4 and jaruesink June 29, 2023 21:51
const existingOnBlur = autocompleteProps.onBlur;
autocompleteProps.onBlur = event => {
setInputValue('');
if (autocompleteProps.onBlur) autocompleteProps.onBlur(event);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was causing an infinite recursive function. We need to pun the function as a const before overwriting it.

@jaruesink
Copy link
Contributor

my hero

@jaruesink jaruesink merged commit e2a2179 into master Jun 29, 2023
@jaruesink jaruesink deleted the fix-input-select branch June 29, 2023 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants