Data Table Navigation
The DataTableWidget works with the Unity Selectable system to control navigation.
Navigation Action Mode
DataTableWidget supports different navigation behaviors via Navigation Action Mode.
Each mode expects certain row-level components on the row prefab.
FocusOnly
Navigation moves EventSystem focus only.
Required:
- Selectable (or Button) on row root or child, with navigation enabled
Recommended:
- `DataItemFocus (focus highlight visual)
Optional:
- `DataItemSelectOnSubmit (select on confirm/submit)
- `DataItemClickAction (select on click/tap)
- `DataItemSelection (selected-state visual)
SelectOnNavigation
When focus enters a row, it becomes selected.
Required:
- Selectable (or Button)
- DataItemSelectOnNavigation
Recommended:
- DataItemSelection (selected-state visual)
Optional:
- `DataItemFocus (separate focus visual)
MoveOnNavigation
Up/Down sends move commands (MoveUp / MoveDown) to reorder items.
Required: - Selectable (or Button) - DataItemMoveOnNavigation
Recommended: - `DataItemFocus (shows focused row while moving)
Optional: - DataItemSelection - DataItemSelectOnSubmit / DataItemClickAction (if selection is still part of your UX)
Recommended "Universal" Row Prefab
If you want to switch modes at runtime without changing row instances, include all of these on the row prefab:
- Selectable (or Button)
- DataItemFocus
- DataItemSelection
- DataItemSelectOnNavigation
- DataItemMoveOnNavigation
- DataItemSelectOnSubmit (optional, for confirm-to-select flows)
Then control behavior from Navigation Action Mode.