Skip to content

Commit

Permalink
fix: rename new method to avoid confusion
Browse files Browse the repository at this point in the history
  • Loading branch information
yeikel16 committed Dec 11, 2024
1 parent 8bd61ab commit f3c055b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/src/model/pluto_column.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -262,7 +262,7 @@ class PlutoColumn {
this.enableAutoEditing = false,
this.enableEditingMode = true,
this.hide = false,
this.disableRowCheckWhen,
this.disableRowCheckboxWhen,
}) : _key = UniqueKey(),
_checkReadOnly = checkReadOnly;

Expand Down
6 changes: 3 additions & 3 deletions lib/src/ui/cells/pluto_default_cell.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class _PlutoDefaultCellState extends PlutoStateWithChange<PlutoDefaultCell> {
@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<bool>(
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit f3c055b

Please sign in to comment.