justinpark opened a new pull request, #21877: URL: https://github.com/apache/superset/pull/21877
### SUMMARY When a user switches to a tab before the slow table list fetch (such like db_exports) completed, it accidentally wiped out the current unsaved changes. This bug makes SQL Lab randomly resets the code to an earlier state. This commit fixes the bug by updating the queryEditors object directly when the request queryEditor is not active state. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF - Before https://user-images.githubusercontent.com/1392866/196775919-5261dc15-c4e3-4e40-bed7-ac677b208973.mov - After https://user-images.githubusercontent.com/1392866/196775908-46617673-e84c-4f5b-80a5-d9b15f504718.mov ### TESTING INSTRUCTIONS - Go to Sqllab and open multiple tabs - set network throttle to slow 3G - Switch to other tab and then immediately switch to the another tab - Type anything on sqllab editor and then check any random revert ### 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]
