Welcome to the Flutter feedback portal. We’re happy you’re here! If you have feedback on how to improve the Flutter, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
I am using a SfDataGrid with SelectionMode.multiple and showCheckboxColumn = true
If I select all the rows via the checkbox column in the header; and then unselect all the rows by unchecking the checkbox column in the header - the onSelectionChanged event is called with 0 added rows and 0 removed rows (when i believe it should be called with the rows that were removed)
I believe the problem is in the handleSelectionFromCheckbox method that is in the SelectionManager class - specifically in the following bit of code:
I noticed that when stepping through the code that oldSelectedItems initially has the unselected rows - however, it was being cleared when rowSelectionManager._clearSelectedRows(dataGridConfiguration) was being called
to correct the issue I believe the line where oldSelectedItems is initialized should be changed to oldSelectedItems = rowSelectionManager._selectedRows.toList() which would create a copy of the list instead of a reference to the list.
Regards,
Jeff