From: Jérôme Benoit Date: Fri, 17 Apr 2026 14:50:18 +0000 (+0200) Subject: fix(ui-web): force toggle button re-mount on navigation back to main view X-Git-Tag: cli@v4.5.0~36 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=92711d429e51c4e4bb2eaafb86c6f47d62f99c63;p=e-mobility-charging-stations-simulator.git fix(ui-web): force toggle button re-mount on navigation back to main view resetToggleButtonState() only cleared localStorage but never triggered ToggleButton re-mount, leaving its reactive state stuck on 'active'. Watch route changes to CHARGING_STATIONS and call refresh() to re-mount both the header toggle and CSTable children, ensuring all shared toggle buttons re-read their (now cleared) localStorage entries. --- diff --git a/ui/web/src/views/ChargingStationsView.vue b/ui/web/src/views/ChargingStationsView.vue index cf583250..7e972d0b 100644 --- a/ui/web/src/views/ChargingStationsView.vue +++ b/ui/web/src/views/ChargingStationsView.vue @@ -129,6 +129,12 @@ watch($chargingStations, () => { state.value.renderChargingStations = randomUUID() }) +watch($route, to => { + if (to.name === ROUTE_NAMES.CHARGING_STATIONS) { + refresh() + } +}) + const clearTemplates = (): void => { $templates.value = [] }