fix(ui): rerender shared toggle buttons properly
[e-mobility-charging-stations-simulator.git] / ui / web / src / views / ChargingStationsView.vue
index cbd8a34ba64bf13ad17f8e57a679cb67aa455c63..c49449f636080a922362f3618d4334ff3354bada 100644 (file)
             $router.push({ name: 'charging-stations' })
           }
         "
+        @clicked="
+          () => {
+            state.renderChargingStations = randomUUID()
+          }
+        "
       >
         Add Charging Stations
       </ToggleButton>
       "
       :key="state.renderChargingStations"
       :charging-stations="app?.appContext.config.globalProperties.$chargingStations"
+      @need-refresh="
+        () => {
+          state.renderAddChargingStations = randomUUID()
+          state.renderChargingStations = randomUUID()
+        }
+      "
     />
   </Container>
 </template>