Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] - How to set pointer index and highlight? #959

Closed
scorphious opened this issue Mar 29, 2019 · 1 comment
Closed

[Question] - How to set pointer index and highlight? #959

scorphious opened this issue Mar 29, 2019 · 1 comment

Comments

@scorphious
Copy link

scorphious commented Mar 29, 2019

Hi @shentao, thanks a lot for your awesome component!

TLDR: How to set pointer value or call out "setPointer" externally?

Currently its triggered on-mouseover or when pressing up-down arrows for example. But what if the dropdown is open and you press "End" key on keyboard, it would scroll to the end of selections and then should set the pointer index on the last item, so pressing "End" and then "up arrow" would highlight and set active (active, not selected) the item before the last for example.

I managed to attach infinity scroll to your component and made it so that end-home btns scroll to start/end (to trigger loading more) and using arrows right after would make it really keyboardly-accessible. Currently scrolling last item in dropdown to view programmatically and pressing arrows will still increment the index from the last state, in this case the first item in the list, although Im already seeing the last items since I scrolled there but didnt mouseover yet.
I dont want to change the "selected" value, just mentioning.

What do you think - could this be possible or is it currently ?

Once again - you awesome, bruh.

@shentao
Copy link
Owner

shentao commented Apr 6, 2019

Hey!
This is sadly not possible with v2. It might be possible with v3. You can take a look at the v3 branch and the roadmap #963 to see the progress on the new version.

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

No branches or pull requests

2 participants