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/01/12 21:08:16 UTC

[GitHub] [superset] suddjian commented on a change in pull request #12252: fix: Displaying filter indicators

suddjian commented on a change in pull request #12252:
URL: https://github.com/apache/superset/pull/12252#discussion_r556095586



##########
File path: superset-frontend/src/dashboard/containers/FiltersBadge.tsx
##########
@@ -38,16 +39,29 @@ const mapDispatchToProps = (dispatch: Dispatch) =>
   );
 
 const mapStateToProps = (
-  { datasources, dashboardFilters, charts }: any,
+  { datasources, dashboardFilters, nativeFilters, charts }: any,
   { chartId }: FiltersBadgeProps,
 ) => {
-  const indicators = selectIndicatorsForChart(
+  const dashboardIndicators = selectIndicatorsForChart(
     chartId,
     dashboardFilters,
     datasources,
     charts,
   );
 
+  const nativeIndicators = selectNativeIndicatorsForChart(nativeFilters);
+
+  const indicators = nativeIndicators.reduce((acc, indicator) => {

Review comment:
       I would suggest using `_.uniqBy()` here instead of `reduce()`.




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