Closed 43081j closed 6 years ago
@bicknellr any chance you can get this merged?
If you're wondering why I check that
selected !== undefined
, it is so (if somehow) non-existent selections are made, nothing will be selected.
Should the this.selected = this._indexToValue(index);
be inside the if
in both cases then?
thanks for taking a look at this russell. will be nice to get it unforgotten and merged if we want it
as for what you said above, it looks like i was talking nonsense..
its a year or two old so i dont quite remember what i was talking about. but the code looks right to me... if selected isn't set yet, we default to the appropriate boundary (0 or length-1), otherwise we do what we did before this PR.
do you see a problem with that logic? (i could be missing something?)
also i will rebase onto master soon
Ok, I realize now that my suggestion doesn't make sense given the goal of this PR. The logic here looks fine as it is.
@bicknellr no worries. i've rebased onto master now so it should be mergeable if you'd like to
Thanks!
BTW, releases now happen on a two week schedule following some extra testing. You can probably expect this to be in a tagged release by late next week.
Fixes #124.
When no selection has been made:
selectNext
will select the first itemselectPrevious
will select the last itemIf you're wondering why I check that
selected !== undefined
, it is so (if somehow) non-existent selections are made, nothing will be selected.