fix(control-panel): match dropdown value by device id to prevent crash
This commit is contained in:
@@ -132,7 +132,7 @@ class _Header extends ConsumerWidget {
|
||||
);
|
||||
}).toList(),
|
||||
values: state.devices,
|
||||
value: state.selectedDevice,
|
||||
value: state.devices.where((d) => d.id == state.selectedDevice?.id).firstOrNull,
|
||||
onChanged: (device) {
|
||||
vm.setSelectedDevice(device);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user