You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is due to ComboboxInput triggering a change on isControlled && controlledValue !== value (line 462) but then deciding whether the input is cleared with value.trim() === "" (line 447). Either both of these comparisons have to .trim() the value or neither, not sure what the most appropriate would be but the discrepancy makes the loop infinite.
Additional context
Your environment
Software
Name(s)
Version
Reach Package
@reach/combobox
0.8.4
React
16.11.0
Browser
Multiple
Assistive tech
N/A
Node
N/A
npm/yarn
yarn
1.19.1
Operating System
Multiple
The text was updated successfully, but these errors were encountered:
π Bug report
Current Behavior
When a controlled Combobox receives a
value
prop that is just whitespace β e.g" "
β it crashes with a "Maximum update depth exceeded" error,Expected behavior
The input is rendered with a value equal to the one passed in without crashing.
Reproducible example
https://codesandbox.io/s/musing-thunder-rmzvv
Suggested solution(s)
The problem is due to ComboboxInput triggering a change on
isControlled && controlledValue !== value
(line 462) but then deciding whether the input is cleared withvalue.trim() === ""
(line 447). Either both of these comparisons have to.trim()
the value or neither, not sure what the most appropriate would be but the discrepancy makes the loop infinite.Additional context
Your environment
The text was updated successfully, but these errors were encountered: