🪟🐛 Connector form: Make control reflect actual value of form field #21911
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.
Fixes #21910
The
Control
component would automatically fill in the default value if no value is set for selects, inputs and text areas. However this can hide the actual state of the form that will be persisted in the database - for unchanging specs this doesn't matter becausesetDefaultValues
inairbyte/airbyte-webapp/src/views/Connector/ConnectorForm/useBuildForm.tsx
Line 25 in 6c2ee30
makes sure to set the default values in the form state itself, but when the spec is changing an an actor is edited, this can get out of sync.
This PR makes sure the actual value from the form values is reflected in the UI as well.
For an additional prop in the spec like this:
Before:
After: