Refactor the ServiceForm to not contain connector type #13056
Labels
area/frontend
Related to the Airbyte webapp
team/platform-move
technical-debt
issues to fix code smell
The ServiceForm currently contains the whole form to create a connector including the actual selection of the connector type within one Formik form. This is causing some weird side-effects, that when switching connectors we're basically exchanging all fields of an Formik form, which has several unnice side-effects (e.g. see #13052 (comment)).
I suggest we split the connector type selection off that form, and make the formik form to only be the actual connector form (Name and downwards). That way this form will only be initialized once a connector is selected and changing that connector would just render a completely different form, which should solve some of the lifecycle issues we're seeing.
The parent component would just keep track of the selected connector type and would merge it in the form values when sending the request.
The text was updated successfully, but these errors were encountered: