Closed yarikleto closed 5 years ago
Hi @alfimois Usually mouse wheel doesn't change focus on elements, not sure if we should add this. Can you explain your use case step by step?
Added by that PR https://github.com/NoriginMedia/react-spatial-navigation/pull/36
Thanks! So basically you need a method for navigate in a certain direction programmatically. Right?
In this case I would call it navigateTo(direction)
or focusNext(direction)
instead of smartNavigateByDirection(direction)
(since smartNavigate is not used in the public api).
what do you think @asgvard ?
@alfimois also please when you open a pull request don't mix things: like refactoring + new feature. Let's keep pull request minimal and focus on one thing. Thanks!
@salvan13 Perhaps navigateByDirection
is a good name. Because "navigateTo" might mean "navigate to some place" instead of direction. Also "focusNext" might mean it focuses some component.
@alfimois I'll add some comments to PR in a minute
Let's keep pull request minimal and focus on one thing. @salvan13 OK, sry)
Usually mouse wheel doesn't change focus on elements, not sure if we should add this. Can you explain your use case step by step?
Our TVs can change focusing by a wheel on the remote ;)
When I handle the wheel event, I need to move to the top or bottom (I won't use focus by keys).
We can use a
smartNavigate
method of theSpatialNavigation
class.