yjwong commented on issue #13985:
URL: https://github.com/apache/airflow/issues/13985#issuecomment-770424026


   Looking at `connection_form.js`, I can take a stab at supporting these. 
However, I'm currently limited by how much I understand how Flask-AppBuilder 
works. 
   
   If I understand the way it currently works, the entire set of fields, 
regardless of the selected connection, is POSTed to the controller.
   
   Haven't read in detail yet, but if the controller can handle fields that are 
omitted in the POST request without negative side effects, `connection_form.js` 
could be modified to save the DOM nodes on initial load, then dynamically 
add/remove them when different connection types are selected. If there are 
negative side effects, we can also attach an `submit` event handler on the form 
to re-add the nodes right before submission.
   
   Also worth noting that this is also an issue not just for required fields, 
but also where someone tries to return an `IntegerField` instead of a 
`StringField`. 


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to