How to customize useGridListItem's internal left/right navigation #4760
Replies: 1 comment 2 replies
-
When you say your iframe is read only, does that mean it doesn't have any interactive elements within it? If that is the case, perhaps its reasonable for the grid list item's treewalker to skip the iframe if it had As for the ability to pass an arbitrary element acceptance filter to the treewalker, I've thought about adding this on several occasions when working on Edit Mode for the TableView, but it would probably be more of an advanced use case and thus wouldn't be readily recommended. |
Beta Was this translation helpful? Give feedback.
-
It doesn't seem possible as this hook uses
getFocusableTreeWalker
internally, which has a hardcoded list of focusable elements to cycle.My use case: In my grid row cell, there is an iframe for read only but important purposes, so it can not be hidden. I want to skip it entirely and just go to the next item. Also currently, once the iframe has focus, it then eats all subsequent left/right arrow keyboard events, ending the navigation.
Being able to pass some
accept(node: Element) => boolean
function like inFocusManager
might be nice?Beta Was this translation helpful? Give feedback.
All reactions