From f3c055b5bae4d2937a15d3fb0995cc4a27d424c2 Mon Sep 17 00:00:00 2001 From: Yeikel Uriarte Arteaga Date: Wed, 11 Dec 2024 13:10:12 -0500 Subject: [PATCH] fix: rename new method to avoid confusion --- lib/src/model/pluto_column.dart | 4 ++-- lib/src/ui/cells/pluto_default_cell.dart | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/src/model/pluto_column.dart b/lib/src/model/pluto_column.dart index b0e382ec..d0cadebc 100644 --- a/lib/src/model/pluto_column.dart +++ b/lib/src/model/pluto_column.dart @@ -152,7 +152,7 @@ class PlutoColumn { bool enableTitleChecked; - bool Function(PlutoRow row)? disableRowCheckWhen; + bool Function(PlutoRow row)? disableRowCheckboxWhen; /// Sort rows by tapping on the column heading. bool enableSorting; @@ -262,7 +262,7 @@ class PlutoColumn { this.enableAutoEditing = false, this.enableEditingMode = true, this.hide = false, - this.disableRowCheckWhen, + this.disableRowCheckboxWhen, }) : _key = UniqueKey(), _checkReadOnly = checkReadOnly; diff --git a/lib/src/ui/cells/pluto_default_cell.dart b/lib/src/ui/cells/pluto_default_cell.dart index a5d7a4b6..1d584edd 100644 --- a/lib/src/ui/cells/pluto_default_cell.dart +++ b/lib/src/ui/cells/pluto_default_cell.dart @@ -101,7 +101,7 @@ class _PlutoDefaultCellState extends PlutoStateWithChange { @override void updateState(PlutoNotifierEvent event) { final disable = - widget.column.disableRowCheckWhen?.call(widget.row) ?? false; + widget.column.disableRowCheckboxWhen?.call(widget.row) ?? false; if (disable) return; _hasFocus = update( @@ -373,7 +373,7 @@ class CheckboxSelectionWidgetState @override void updateState(PlutoNotifierEvent event) { final disable = - widget.column.disableRowCheckWhen?.call(widget.row) ?? false; + widget.column.disableRowCheckboxWhen?.call(widget.row) ?? false; if (disable) { _checked = _pureValue; return; @@ -423,7 +423,7 @@ class CheckboxSelectionWidgetState @override Widget build(BuildContext context) { final disable = - widget.column.disableRowCheckWhen?.call(widget.row) ?? false; + widget.column.disableRowCheckboxWhen?.call(widget.row) ?? false; return PlutoScaledCheckbox( value: _checked,