ktmud opened a new pull request #13109:
URL: https://github.com/apache/superset/pull/13109


   ### SUMMARY
   
   Fixes #13099 
   
   `FilterBox` will send empty string as filter values when a column's 
`defaultValue` is empty string, causing no-results for filtered charts.
   
   The default value for filter column's `defaultValue` is `null`, but if users 
have edited it, it will be updated to an empty string. 
   
   <img 
src="https://user-images.githubusercontent.com/335541/107862149-8fb4a200-6dff-11eb-9009-3b57e249b227.png";
 width="500">
   
   This empty string is then propagated to `extra_filters` of the affected 
charts. This PR will treat empty strings as `null` when constructing filter 
values for the dashboard.
   
   This is the preferred fix because there may be existing `FilterBox` charts 
already have `defaultValue: ""` saved in their metadata.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   See  #13099 how to reproduce the bug.
   
   ### TEST PLAN
   
   1. Manual verification following steps in #13099
   2. Added a unit test 
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [x] 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