Skip to content

Commit

Permalink
feat(ZMS-2936): fix scroll bug CalendarView.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
lehju committed Feb 24, 2025
1 parent 1356fdb commit a95e609
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions zmscitizenview/src/components/Appointment/CalendarView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ import {
MucSlider,
MucSliderItem,
} from "@muenchen/muc-patternlab-vue";
import { computed, inject, onMounted, ref, watch } from "vue";
import { computed, inject, nextTick, onMounted, ref, watch } from "vue";
import { AvailableDaysDTO } from "@/api/models/AvailableDaysDTO";
import { AvailableTimeSlotsDTO } from "@/api/models/AvailableTimeSlotsDTO";
Expand Down Expand Up @@ -416,9 +416,13 @@ const handleProviderSelection = (id: number) => {
showSelectionForProvider(selectableProviders.value[id]);
};
const handleTimeSlotSelection = (timeSlot: number) => {
const handleTimeSlotSelection = async (timeSlot: number) => {
selectedTimeslot.value = timeSlot;
if (summary.value) summary.value.focus();
if (summary.value) {
await nextTick();
summary.value.focus();
summary.value.scrollIntoView({ behavior: "smooth", block: "center" });
}
};
/**
Expand Down

0 comments on commit a95e609

Please sign in to comment.