react-autocomplete icon indicating copy to clipboard operation
react-autocomplete copied to clipboard

Immutablejs support

Open KevinSagan opened this issue 9 years ago • 2 comments

It seems to be mostly working out of the box, but I ran into one bug--the Enter key down handler pulls the highlighted item out of the list with square brackets: this.getFilteredItems()[this.state.highlightedIndex] Would you be willing to change this to: this.getFilteredItems().get(this.state.highlightedIndex)

KevinSagan avatar Apr 04 '16 20:04 KevinSagan

then it would only work w/ immutable-js. Perhaps we could have a getItemAtIndex prop to let you inject the behavior.

ryanflorence avatar Apr 04 '16 22:04 ryanflorence

Oh, js primitive array doesn't have .get(index)? I'm an idiot. Eh, in that case it's not much less work for you than it would be for me to just transform to primitive before I hand it to the autocomplete. Thank you anyway.

KevinSagan avatar Apr 05 '16 13:04 KevinSagan