fix: select component reactivity in device mapping dialog

- Create new Map instance in handleDeviceSelect to trigger Svelte 5 reactivity
- Fixes issue where user selection wasn't updating the UI
- Ensures device mappings update correctly when user chooses from dropdown
This commit is contained in:
Valknar XXX
2025-10-28 05:45:16 +01:00
parent 9d9f72dec1
commit 6e94ec99bc

View File

@@ -73,7 +73,9 @@ function handleConfirm() {
function handleDeviceSelect(recordedDeviceName: string, selectedDeviceId: string) {
const device = connectedDevices.find(d => d.id === selectedDeviceId);
if (device) {
mappings.set(recordedDeviceName, device);
const newMappings = new Map(mappings);
newMappings.set(recordedDeviceName, device);
mappings = newMappings;
}
}