siddharthbaleja7 commented on issue #4022: URL: https://github.com/apache/streampipes/issues/4022#issuecomment-3654765554
@dominikriemer I wanted to discuss my approach before opening a PR: **Current Problem:** In `confirmLeaveDialog`, the save request is triggered asynchronously, but the function immediately returns `true`. This allows the router to navigate away before the save completes, causing the overview to load with potentially stale or incomplete data. **Proposed Solution:** - Use `switchMap` to chain the save request with the navigation action. - Ensure the router **waits for the save to complete successfully** before navigating back to the overview. - Handle errors gracefully so that if the save fails, navigation is **prevented** and an error message is displayed. I’d like to confirm this approach aligns with expectations before I start the PR. Feedback is welcome! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
