You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/01/31 18:08:45 UTC

[GitHub] [airflow] yjwong commented on issue #13985: Can't save any connection if provider-provided connection form widgets have fields marked as InputRequired

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:
users@infra.apache.org