🪟 🐛 Connection Creation form should use existing values before using retreived values #15201
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Closes #14844
Previously, when creating a Connection, if an item from outside the
syncCatalog
object was updated, when the form reinitialized, any user-configured values in thesyncCatalog
fields would be overwritten.How
Now, we grab the
syncCatalog
from theformValues
object if it exists, or else grab it from the value we got from the API.Recommended reading order
There is only one file.
Testing
Create a new connection.
Change some of the items in the
syncCatalog
section (enable/disable streams, change their sync modes, etc.).Change the value in a text input field at the top of the form.
Values on the form should not change (except for the text input field you purposely changed).
I have also manually tested other inputs on this form... changing the values of any one should not affect any of the others now. We will likely want to add unit testing to this as part of our epic to improve connection creation/editing in Q3.