Skip to content

Data Item Click Action

DataItemClickAction turns a tap or mouse click on a row element into a data item command.

DataItemClickAction

Use it when row clicks should request actions like Select, ToggleSelect, or ContextMenu.

What It Does

  • Sends one configured command to the parent data widget when clicked.
  • Filters input by click type (Any, Primary, or Secondary).
  • Optionally requires this exact object to be the direct UI raycast hit.
  • Sends an OnPointerClick system event to the root item GameObject.

Setup

  1. Add Data Item Click Action to the row object you want clickable.
  2. Set Command to the action your widget should handle.
  3. Set Tap Trigger to control which pointer button can fire it.
  4. Optional: keep Require Direct Hit enabled to block clicks through overlays.
  5. Optional: set Identifier if FSM logic needs to know which control fired.

Inspector Fields

Field Description
Command Row action command sent to the data widget.
Tap Trigger Which click/tap type can trigger the action: AnyClickOrTap, PrimaryOnly, or SecondaryOnly.
Require Direct Hit Only fires when this exact GameObject is the top raycast hit.
Identifier Optional control label included with the request.

Runtime Notes

  • Touch taps count as primary input.
  • With Require Direct Hit on, parent/background objects do not fire if another UI graphic is on top.
  • The parent data widget host handles the command.

Tips

  • Use PrimaryOnly for normal row selection.
  • Use SecondaryOnly for desktop context actions without affecting left-click selection.
  • Keep Identifier values consistent when multiple click targets share the same row.

See Also