-
Notifications
You must be signed in to change notification settings - Fork 294
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
Keyboard navigation support #555
Comments
You can do this using DOM listeners and the "scrollContainer.scrollToPosition" method. Just keep track of which element is selected, then calculate the position of the next/previous one, and call the method Personally I don't think this is something that should be "built in". But all the methods/data to make it possible are here already. |
@lincolnthree that sounds workable, do you have an example? we are trying to write our custom method with CDK focusKeyManager, but the logic isn't that simple. |
Unfortunately not a good one. It's pretty embedded in my application, but here's the general idea: This would track the index of the selected item (and presumably highlight it)
Some code for figuring out the item height based on our component / wrapper for the virtual list:
HostListeners for keyboard binding events in Angular:
|
Would possible to add keyboard navigation(arrow up/down) & enter key support?
The text was updated successfully, but these errors were encountered: