From dbbaa512248213d4f2174e642dd6e2034a7f94dd Mon Sep 17 00:00:00 2001 From: Amandus Butzer Date: Fri, 20 Oct 2023 17:23:37 +0200 Subject: [PATCH] fix(alternative-routes): mismatched open route details when selecting an alternative route via map or the button in the route details, the active route would change but the details would not be expanded. The panel that should be expanded is now set from the, activeRouteIndex in the store. - avoid collapsing again for button in the route details --- .../components/route-details/RouteDetails.vue | 4 ++-- .../components/route-details/route-details.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fragments/forms/map-form/components/place-and-directions/components/route-details/RouteDetails.vue b/src/fragments/forms/map-form/components/place-and-directions/components/route-details/RouteDetails.vue index 71a6c20cb..5233dad85 100644 --- a/src/fragments/forms/map-form/components/place-and-directions/components/route-details/RouteDetails.vue +++ b/src/fragments/forms/map-form/components/place-and-directions/components/route-details/RouteDetails.vue @@ -7,11 +7,11 @@

{{$t('routeDetails.routeDetails')}}

- +

{{$t('routeDetails.route')}} {{routeIndex + 1}} ({{route.summary.distance}}) - + done

diff --git a/src/fragments/forms/map-form/components/place-and-directions/components/route-details/route-details.js b/src/fragments/forms/map-form/components/place-and-directions/components/route-details/route-details.js index ad9d1d08f..ed50eaca5 100644 --- a/src/fragments/forms/map-form/components/place-and-directions/components/route-details/route-details.js +++ b/src/fragments/forms/map-form/components/place-and-directions/components/route-details/route-details.js @@ -46,8 +46,8 @@ export default { shareUrl () { return location.href }, - startedPanelExtended () { - return this.localMapViewData.routes.length > 0 ? 0 : null + panelExtended () { + return this.localMapViewData.routes.length > 0 ? this.$store.getters.activeRouteIndex : null }, /** * Builds and return the routes