bbovenzi commented on code in PR #55558:
URL: https://github.com/apache/airflow/pull/55558#discussion_r2349980335
##########
airflow-core/src/airflow/ui/src/pages/Connections/ConnectionForm.tsx:
##########
@@ -251,8 +265,20 @@ const ConnectionForm = ({
<Spacer />
<Button
colorPalette="brand"
- disabled={Boolean(errors.conf) || formErrors || isPending ||
!isValid || !isDirty}
- onClick={() => void handleSubmit(onSubmit)()}
+ disabled={
+ Boolean(errors.conf) || formErrors || isPending || !isValid ||
(!isDirty && !isExtraFieldsDirty)
+ }
+ onClick={() => {
+ // Update the form's extra field with the latest conf value
before submitting
+ void handleSubmit((data) => {
+ const updatedData = {
+ ...data,
+ extra,
Review Comment:
I think this should be the other way around. Otherwise the existing `extra`
values will override the user-edited values.
Order matters when spreading props
--
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]