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 2021/06/29 08:03:21 UTC

[GitHub] [superset] villebro commented on a change in pull request #15424: perf(dashboard): Improve perf of highlighting charts in scope of active filter

villebro commented on a change in pull request #15424:
URL: https://github.com/apache/superset/pull/15424#discussion_r660376119



##########
File path: superset-frontend/src/dashboard/components/FiltersBadge/selectors.ts
##########
@@ -147,11 +144,10 @@ export const selectIndicatorsForChart = (
   chartId: number,
   filters: { [key: number]: Filter },
   datasources: { [key: string]: Datasource },
-  charts: any,
+  chart: any,
 ): Indicator[] => {
-  const chart = charts[chartId];
-  // no indicators if chart is loading
-  if (chart.chartStatus === 'loading') return [];
+  // no indicators before chart is rendered
+  if (chart.chartStatus !== 'rendered') return [];

Review comment:
       This change (and the other one for native filters) removes the indicator if no results are returned:
   
   ### BEFORE
   ![image](https://user-images.githubusercontent.com/33317356/123759998-1c509000-d8c9-11eb-87c9-865b8e327def.png)
   
   ### AFTER
   ![image](https://user-images.githubusercontent.com/33317356/123760129-3ab68b80-d8c9-11eb-8a3d-642fb6df871c.png)
   
   This should probably either be left unchanged, or changed to 
   ```js
     if (!['rendered', 'success'].includes(chart.chartStatus) return [];
   ```




-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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