michael-s-molina opened a new pull request #16994:
URL: https://github.com/apache/superset/pull/16994


   ### SUMMARY
   The native filters were firing unnecessary queries when their values 
changed. This was happening because an `useEffect` hook uses the `formData` as 
a dependency and the` url_params` property changes every time a value changes. 
To avoid that, I removed the `url_params` from the comparison but we should 
definitely improve our `useEffect` dependencies to use more granular 
information instead of big objects that require deep comparison. Added a `TODO` 
in the code for future refactoring.
   
   I also changed the dependency in the calculation of the cascade filters tree 
to avoid unnecessary runs.
   
   @rusackas @villebro @graceguo-supercat 
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
https://user-images.githubusercontent.com/70410625/136264904-3860ac19-8dc1-48b4-a017-b2d433587245.mov
   
   
https://user-images.githubusercontent.com/70410625/136265001-ce79faec-8e65-46c3-a197-e9ab27e5f2ba.mov
   
   ### TESTING INSTRUCTIONS
   Check the videos for instructions.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] 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.

To unsubscribe, e-mail: [email protected]

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