mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 2042: fix(navigation): prevent autoTriggerContinueFn from persisting across navigat...
fix(navigation): prevent autoTriggerContinueFn from persisting across navigations The autoTriggerContinueFn flag was remaining in navigation context after being read, causing incorrect auto-triggering on subsequent page visits. Changes: - Add patchContext() method to NavigationContextService and NavigationStateService for partial context updates without full replacement - Update details-main-view.component to use patchContext() to clear the flag immediately after reading, while preserving returnUrl - Add comprehensive JSDoc and README documentation for patchContext() - Include structured logging for patch operations The new patchContext() method provides a cleaner API for updating specific context properties without manually preserving all other properties. Closes #5500 Related work items: #5500
This commit is contained in:
committed by
Nino Righi
parent
7a6a2dc49d
commit
bf87df6273
@@ -329,6 +329,12 @@ export class CustomerDetailsViewMainComponent
|
||||
}>('select-customer');
|
||||
|
||||
if (context?.autoTriggerContinueFn) {
|
||||
// Clear the autoTriggerContinueFn flag immediately (preserves returnUrl automatically)
|
||||
await this._navigationState.patchContext(
|
||||
{ autoTriggerContinueFn: undefined },
|
||||
'select-customer',
|
||||
);
|
||||
|
||||
// Auto-trigger continue() ONLY when coming from Kundenkarte
|
||||
this.continue();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user