graceguo-supercat commented on a change in pull request #8404: 
[WIP][feature]Dashboard filter scope selector modal
URL: 
https://github.com/apache/incubator-superset/pull/8404#discussion_r340806563
 
 

 ##########
 File path: superset/assets/src/dashboard/reducers/getInitialState.js
 ##########
 @@ -199,6 +198,8 @@ export default function(bootstrapData) {
       layout[layoutId].meta.sliceName = slice.slice_name;
     }
   });
+  buildActiveFilters(dashboardFilters);
+  buildFilterColorMap(dashboardFilters);
 
 Review comment:
   yes. this is important change. if you compared with old version, these 2 
lines:
   ```
     buildActiveFilters(dashboardFilters);
     buildFilterColorMap(dashboardFilters);
   ```
   was inside `dashboard.slices.forEach` loop. In the loop we create the 
initial state for dashboardFilters. These 2 lines are used to get all currently 
active filter's values and pick a color badge for each filter field. I think it 
should be called only **once**, after all dashboardFilter entries are populated 
from bootstrap data.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to