villebro commented on code in PR #23509:
URL: https://github.com/apache/superset/pull/23509#discussion_r1151715696


##########
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/utils.ts:
##########
@@ -62,5 +63,16 @@ export const checkIsApplyDisabled = (
   );
 };
 
+export const getVerboseMapsForCharts = (
+  charts: ChartsState,
+  datasources: DatasourcesState,
+) =>
+  Object.keys(charts).reduce((obj, chartId) => {
+    const chartDatasource = 
datasources[charts[chartId]?.form_data?.datasource];
+    return Object.assign(obj, {
+      [chartId]: chartDatasource ? chartDatasource.verbose_map : {},
+    });

Review Comment:
   This comes down to personal preference, but I prefer using the spread 
operator for stuff like this as it feels more readable:
   ```javascript
   return {
     ...obj,
     [chartId]: chartDatasource ? chartDatasource.verbose_map : {},
   };
   ```



-- 
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-unsubscr...@superset.apache.org

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


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

Reply via email to