eschutho opened a new pull request #13563:
URL: https://github.com/apache/superset/pull/13563


   ### SUMMARY
   Fixes issue with template params modal not opening when value was null. 
   I converted one file to tsx so that we can put a null check on the code 
argument in TemplateParamsEditor, but it won't help much until the rest of the 
files are converted. I also made the initial state undefined instead of null so 
that we can use default args downstream. Lastly, I put in a check at the ace 
editor itself to never accept a null or undefined value, but pass an empty 
string in that case. 
   
   fixes https://github.com/apache/superset/issues/13540
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   see #13540 for before state (no modal opens)
   
   after:
   https://github.com/apache/superset/issues/13540
   
   ### TEST PLAN
   unit tests aren't completely reliable when it comes to passing a null value 
to ace editor. It was difficult to reproduce the issue in the tests. I wrote 
tests around the new code to ensure that we are using undefined instead of null.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to