Skip to content

Reset highlight after items change #22

@lujiajing1126

Description

@lujiajing1126

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions