You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/08/19 22:30:21 UTC

[GitHub] [incubator-superset] graceguo-supercat opened a new pull request #8070: [Explore view] Fix extra data fetch when user clicks Run Query

graceguo-supercat opened a new pull request #8070: [Explore view] Fix extra data fetch when user clicks Run Query
URL: https://github.com/apache/incubator-superset/pull/8070
 
 
   ### CATEGORY
   
   Choose one
   
   - [x] Bug Fix
   - [ ] Enhancement (new features, refinement)
   - [ ] Refactor
   - [ ] Add tests
   - [ ] Build / Development Environment
   - [ ] Documentation
   
   ### SUMMARY
   In explore view, when user change controls and run query again, data fetch are triggered twice. see the animated gif below. 
   
   I believe this issue was introduced since #7233. Before #7233, dashboard will trigger new queries for all charts in dashboard when filter is updated, even for those charts are under nested tabs and not visible. 
   
   In #7233, we only updated query parameters when filter is updated, but delayed the trigger for new query until chart becomes visible. Instead of call `postChartFormData` to trigger data fetching API,  I added a componentDidupdate method for chart component, and use react component state change and triggerQuery flag to trigger the data fetch.
   
   Currently explore view container component still call `postChartFormData` to trigger data fetching API directly, when user clicks on Run Query button. Together with chart's componentDidupdate change, that's the reason data fetching is called twice.
   
   Solution:
   Do not need to call `postChartFormData` from exploreview container component.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   **Before**
    
   ![Il9FmAes6u](https://user-images.githubusercontent.com/27990562/63303904-11bd1c80-c296-11e9-809c-14f9a059f8fb.gif)
   
   
   **After**
   ![disyNsnsY6](https://user-images.githubusercontent.com/27990562/63303799-c0ad2880-c295-11e9-9563-f4f087e059da.gif)
   
   
   
   ### TEST PLAN
   CI and manual test
   
   
   ### REVIEWERS
   @etr2460 @michellethomas

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org