DataRow2
Extends flet.DataRow, adding row-level tap events.
There are also on_secondary_tap and on_secondary_tap_down, which are not available in DataCells and can be useful in desktop settings to handle right-click actions.
Inherits: DataRow
Properties
decoration- Decoration to be applied to this row.specific_row_height- Specific row height.
Events
on_double_tap- Fires when the row is double-tapped.on_secondary_tap- Fires when the row is right-clicked (secondary tap).on_secondary_tap_down- Fires when the row is right-clicked (secondary tap down).on_tap- Fires when the row is tapped.
Properties
decorationclass-attributeinstance-attribute
decoration: Optional[BoxDecoration] = NoneDecoration to be applied to this row.
If provided, flet.DataTable.divider_thickness has no effect.
specific_row_heightclass-attributeinstance-attribute
specific_row_height: Optional[Number] = NoneSpecific row height.
Falls back to flet_datatable2.DataTable2.data_row_height if not set.
Events
on_double_tapclass-attributeinstance-attribute
on_double_tap: Optional[ControlEventHandler[DataRow2]] = NoneFires when the row is double-tapped.
Won't be called if tapped cell has any tap event handlers (on_tap, on_double_tap, on_long_press, on_tap_cancel, on_tap_down) set.
on_secondary_tapclass-attributeinstance-attribute
on_secondary_tap: Optional[ControlEventHandler[DataRow2]] = NoneFires when the row is right-clicked (secondary tap).
Won't be called if tapped cell has any tap event handlers (on_tap, on_double_tap, on_long_press, on_tap_cancel, on_tap_down) set.
on_secondary_tap_downclass-attributeinstance-attribute
on_secondary_tap_down: Optional[ControlEventHandler[DataRow2]] = NoneFires when the row is right-clicked (secondary tap down).
Won't be called if tapped cell has any tap event handlers (on_tap, on_double_tap, on_long_press, on_tap_cancel, on_tap_down) set.
on_tapclass-attributeinstance-attribute
on_tap: Optional[EventHandler[TapEvent[DataRow2]]] = NoneFires when the row is tapped.
Won't be called if tapped cell has any tap event handlers (on_tap, on_double_tap, on_long_press, on_tap_cancel, on_tap_down) set.