mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
fix selection for the devices
This commit is contained in:
@ -47,13 +47,10 @@ class _DynamicTableState extends State<DynamicTable> {
|
||||
|
||||
void _toggleRowSelection(int index) {
|
||||
setState(() {
|
||||
for (int i = 0; i < _selected.length; i++) {
|
||||
_selected[i] = false;
|
||||
}
|
||||
_selected[index] = true;
|
||||
_selected[index] = !_selected[index];
|
||||
|
||||
if (widget.onRowSelected != null) {
|
||||
widget.onRowSelected!(index, true, widget.data[index]);
|
||||
widget.onRowSelected!(index, _selected[index], widget.data[index]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user