Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🪟🐛 Warn on navigating away from unsaved connector form with error #20072

Merged
merged 1 commit into from
Dec 6, 2022

Conversation

flash1293
Copy link
Contributor

What

Fixes #18246

When navigating away from an unsaved connector form with an error, the warning is shown.

How

Make sure exceptions are thrown up the promise chain from the actual react-query call to the submit callback so the connector form is not clearing the dirty state of the form change tracker.

@octavia-squidington-iv octavia-squidington-iv added the area/platform issues related to the platform label Dec 5, 2022
@flash1293 flash1293 marked this pull request as ready for review December 5, 2022 16:13
@flash1293 flash1293 requested a review from a team as a code owner December 5, 2022 16:13
Copy link
Contributor

@lmossman lmossman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM. Tested locally and bug looks to be resolved!

@@ -89,7 +89,7 @@ export interface ConnectorFormProps {
formId?: string;
selectedConnectorDefinition?: ConnectorDefinition;
selectedConnectorDefinitionSpecification?: ConnectorDefinitionSpecification;
onSubmit: (values: ConnectorFormValues) => Promise<void> | void;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks much cleaner now 🙌

@flash1293 flash1293 merged commit 4ea4417 into master Dec 6, 2022
@flash1293 flash1293 deleted the flash1293/unsaved-changes-modal branch December 6, 2022 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend Related to the Airbyte webapp area/platform issues related to the platform team/extensibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User won't get "Unsaved changes" modal after moving to another page if testing connector has failed
3 participants