Closed sharpsaravanan closed 1 year ago
try static func like this:
onSelected: onSelected, )
void onSelected(PlutoGridStateManager stateManager, PlutoGridOnSelectedEvent event) { if (event.row != null) { setState(() { isRowSelected = true; selectedUser = _users.firstWhereOrNull((element) => element.id == event.row!.cells["id"]!.value); blockText = selectedUser!.blocked! ? "Unblock" : "Block"; }); } else { isRowSelected = false; } }
I have same issue as sharpsaravanan. I think this is because isEditableMode getter of PlutoGridMode enum is imlemented like this
bool get isEditableMode => isNormal || isPopup;
It should be like this
bool get isEditableMode => isNormal || isPopup || isSelectMode;
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
onSelected event does not trigger in mode: PlutoGridMode.normal
PlutoGrid( columns: columns, rows: rows, mode: PlutoGridMode.normal, onSelected: (PlutoGridOnSelectedEvent event) { print('onSelected'); //does not trigger }, )
Execution Environment
flutter --version
Flutter 3.10.5 • channel stable • https://github.com/flutter/flutter.git Framework • revision 796c8ef792 (4 weeks ago) • 2023-06-13 15:51:02 -0700 Engine • revision 45f6e00911 Tools • Dart 3.0.5 • DevTools 2.23.1
PlutoGrid version pluto_grid: ^7.0.2