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 2020/05/24 16:15:11 UTC

[GitHub] [incubator-superset] mistercrunch commented on a change in pull request #9891: fix: [dashboard] should not trigger chart refresh when filter not applicable

mistercrunch commented on a change in pull request #9891:
URL: https://github.com/apache/incubator-superset/pull/9891#discussion_r429651988



##########
File path: superset-frontend/src/dashboard/components/Dashboard.jsx
##########
@@ -159,11 +159,27 @@ class Dashboard extends React.PureComponent {
           // added filter?
           [].push.apply(affectedChartIds, activeFilters[filterKey].scope);
         } else {
-          // changed filter field value or scope?
-          const affectedScope = (activeFilters[filterKey].scope || []).concat(
-            appliedFilters[filterKey].scope || [],
-          );
-          [].push.apply(affectedChartIds, affectedScope);
+          // has filter field value change?

Review comment:
       NIT(optional ): `componentDidUpdate` is getting pretty large and opaque, it could be could to refactor into a `applyFilters` or some better name.




----------------------------------------------------------------
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



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