Open joshuaben opened 4 months ago
any update on this ?
Hi! Thank you for your request. We have actually discussed this quite a few times internally. It would be convenient to have a feature of focusing a closest child based on the previous coordinate, even when it comes from another parent wrapper. We need to re-iterate on it. I would keep this open to not forget about this :) This would be convenient for grid-like layouts where you have multiple rows and you want to jump between rows to the closest item.
I would also appreciate such feature
Describe the bug I would like to have the ability to navigate the focus to the closest element in the direction of the navigation vs the fist item in the list or the restored focus when navigating up and down between various rows.
To Reproduce Steps to reproduce the behavior: Tapping left and right on container works fine. Navigating the focus up or down to the previous/next row sets the focus on the first item
Expected behavior Set the focus on the closest element in the intended direction. ie: if I am on the 3rd item and I tap down, I should land on the 3rd item in the row directly below the currently focused row.
Screenshots
What I am seeing:
https://github.com/NoriginMedia/Norigin-Spatial-Navigation/assets/135044379/219ccfaf-ff89-4801-a8e6-6700d57c28a9
What I would like to see:
https://github.com/NoriginMedia/Norigin-Spatial-Navigation/assets/135044379/8b5e9491-0cbd-41cc-9d31-c06470c8d79d
The wrapping when setting
focusKey="SAME"
see in code below:https://github.com/NoriginMedia/Norigin-Spatial-Navigation/assets/135044379/2865d57a-85f7-413d-86d2-40c4c5fbd700
Additional context
The relevant section:
Please advice on a solution, or what is being set incorrectly. As always, any and all direction is appreciated, so thanks in advance!
BTW, this is a pretty slick library and solves a ton of issues with building a cross-platform TV app!