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
According to the componentDidUpdate lifecycle method,
if (!isEqual(prevProps.items, this.props.items)) {
.....
The cursor will be reset everytime the items "change" which is not expected
in some cases.
For example, I just change the label properties which is actually displayed
on the screen, without changing value which is the key of the item and represents
real data. If so, the cursor is still reset.
So, I wonder if the condition could be changed. For example, just compare the values
of the items, or at least the length of the array.
Also, the control may be given to the developer by passing some prop as a function of shouldResetCursor?
The text was updated successfully, but these errors were encountered:
According to the
componentDidUpdate
lifecycle method,The cursor will be reset everytime the items "change" which is not expected
in some cases.
For example, I just change the
label
properties which is actually displayedon the screen, without changing
value
which is the key of the item and representsreal data. If so, the cursor is still reset.
So, I wonder if the condition could be changed. For example, just compare the
value
sof the items, or at least the length of the array.
Also, the control may be given to the developer by passing some prop as a function of
shouldResetCursor
?The text was updated successfully, but these errors were encountered: