kgabryje opened a new pull request #15172: URL: https://github.com/apache/superset/pull/15172
### SUMMARY Due to using a complex javascript object in `useEffect`'s dependency array in `ViewQueryModal`, we were rerunning API request on every rerender of the modal (including resizing window). I fixed it by using `JSON.stringify` method in the dependency array. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF Before: see #14696 After: https://user-images.githubusercontent.com/15073128/122034659-070c3980-cdd2-11eb-8617-6650cf4b3c43.mov ### TESTING INSTRUCTIONS 1. Open a dashboard and View Query modal 2. Resize window 3. Verify that API request wasn't rerun after resizing window. ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [x] Has associated issue: closes #14696 - [ ] 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 CC: @junlincc -- 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]
