Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

[fixed] Reset highlightedIndex when it's outside of items.length #139

Merged
merged 1 commit into from
Jul 19, 2016

Conversation

CMTegner
Copy link
Collaborator

I believe this will resolve most of the funkyness we've been seeing when updating items on the fly while the user types, e.g. #52. /cc @sprjr

@CMTegner CMTegner added the bug label Jul 18, 2016
@whichsteveyp whichsteveyp added this to the Release 1.0.x milestone Jul 18, 2016
@@ -60,6 +60,21 @@ describe('Autocomplete acceptance tests', () => {

});

it('should reset `highlightedIndex` when `items` changes', () => {
autocompleteWrapper.setState({ highlightedIndex: 10 });
autocompleteWrapper.setProps({ items: [] })
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: ;

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants