Data Item Move On Navigation
DataItemMoveOnNavigation sends MoveUp and MoveDown row commands from Unity EventSystem navigation input.
Use it when Up/Down navigation should reorder rows in a Data Table Widget.
What It Does
- Handles
OnMoveevents on the row object. - Sends
MoveUpfor Up input andMoveDownfor Down input. - Can consume handled moves so EventSystem focus does not continue to other controls.
- Can also consume movement at table bounds to keep focus in the table.
- Respects DataTableWidget
Navigation Action Modeand only runs when that mode isMove On Navigation.
Setup
- Add this component to the row object that receives navigation move events.
- In DataTableWidget, set
Navigation Action ModetoMove On Navigation. - Keep
Handle UpandHandle Downenabled unless you need one-way behavior. - Set consume options based on whether focus should stay in the table at bounds.
- Test with keyboard/gamepad to verify move and focus behavior.
Inspector Fields
| Field | Description |
|---|---|
| Handle Up | Sends MoveUp for Up navigation input. |
| Handle Down | Sends MoveDown for Down navigation input. |
| Consume Handled Move | Calls eventData.Use() after a successful handled move. |
| Consume At Bounds | Also consumes Up/Down when move cannot occur at bounds, preventing focus from leaving the table. |
Runtime Notes
- Row moves are handled by the parent data widget host.
- With paging enabled, move behavior follows the widget's reorder settings for visible page scope.
- Disable consume options if you want normal EventSystem edge navigation to continue outside the table.