moroshko / react-autowhatever

Accessible rendering layer for Autosuggest and Autocomplete components

Home Page:http://react-autowhatever.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

make list bounded when using arrows

fijolekProjects opened this issue · comments

Right now using up and down arrows on list rendered by autowhatever causes "null" value at the end of list. It would be nice if there would be possibility of using only available values when using arrows.

Example: https://jsfiddle.net/b6m0frgs/9/

Type 'a' -> press arrow key down (you see 'Apple') -> press arrow key down (you see 'Banana') -> press arrow key down (you see 'Cherry') -> press arrow key down (you see 'a')

So maybe instead of last 'a' there should be 'Apple' again.
This could be configurable by a flag. What do you think? It will be nice thing to have in react-autosuggest

Cheers,
Michał

@moroshko WDYT? I could prepare this change

I came up with different solution for my problem, so this issue is no longer important for me. Sorry for that

Cheers