After searching in select, it triggers when the keyboard is up/down, and the page crashes. errMsg:Uncaught Invariant Violation: Maximum update depth exceeded. #980
After searching in select, it triggers when the keyboard is up/down, and the page crashes.
Errors were reported as follows:
Uncaught Invariant Violation: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
Reproduce Steps
After searching in select, it triggers when the keyboard is up/down, and the page crashes.
Error Trace (if possible)
Uncaught Invariant Violation: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
Solution
value: function navigateOptions(direction) {
...
...
...
if (options.length != options.filter(function (item) {
return item.props.disabled === true;
}).length) {
if (direction === 'next') {
hoverIndex++;
Description
After searching in select, it triggers when the keyboard is up/down, and the page crashes. Errors were reported as follows: Uncaught Invariant Violation: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
Reproduce Steps
After searching in select, it triggers when the keyboard is up/down, and the page crashes.
Error Trace (if possible)
Uncaught Invariant Violation: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
Solution
value: function navigateOptions(direction) { ... ... ... if (options.length != options.filter(function (item) { return item.props.disabled === true; }).length) { if (direction === 'next') { hoverIndex++;
Additional Information
There are still some problems with this change, such as: the upper and lower keys can only flip the visual area;
I see that the props attribute does not exist.