feat: Reflect route change on stepper click, re-capture original form after section change to fix confirm dialog issue

This commit is contained in:
2026-02-07 09:04:02 +01:00
parent 56d77ebb89
commit 52b2bd4cfb
2 changed files with 16 additions and 3 deletions

View File

@@ -264,9 +264,15 @@ onUnmounted(() => {
watch(
() => activeStepperItemIndex.value,
async () => {
async (newIdx, oldIdx) => {
await nextTick()
scrollToActiveStep()
// Emit navigate event when stepper index changes (from direct clicks)
// Note: navigateStepper() emits via its onNavigate callback, so button clicks are covered
if (newIdx !== oldIdx && oldIdx !== undefined) {
emit('navigate', { direction: newIdx > oldIdx ? 'forward' : 'backward', index: newIdx })
}
}
)
@@ -379,7 +385,6 @@ function findSubsectionByKey(subsectionKey: string): FormElementSubSectionDto |
async function handleNavigate(direction: 'forward' | 'backward') {
await navigateStepper(direction)
emit('navigate', { direction, index: activeStepperItemIndex.value })
}
function handleCloneElement(element: FormElementDto, position: number, subsectionKey: string) {