bito-code-review[bot] commented on code in PR #43634:
URL: https://github.com/apache/superset/pull/43634#discussion_r3902024630


##########
superset-frontend/src/pages/ChartList/index.tsx:
##########
@@ -260,11 +261,33 @@ function ChartList(props: ChartListProps) {
     },
     setResourceCollection: setCharts,
     hasPerm,
-    fetchData,
+    fetchData: fetchChartData,
     toggleBulkSelect,
     refreshData,
   } = useListViewResource<Chart>('chart', t('chart'), addDangerToast);
 
+  const fetchData = useCallback(
+    (config: ListViewFetchDataConfig) =>
+      fetchChartData({
+        ...config,
+        ...(config.sortBy[0]?.id === 'viz_type'
+          ? {
+              extraQueryParams: {
+                viz_type_names: Object.fromEntries(
+                  registry
+                    .keys()
+                    .map(vizType => [
+                      vizType,
+                      registry.get(vizType)?.name || vizType,
+                    ]),
+                ),
+              },
+            }
+          : {}),
+      }),
+    [fetchChartData],
+  );

Review Comment:
   <!-- Bito Reply -->
   The observation regarding the `refreshData` bypass is noted. Since the 
regression test confirms that the `extraQueryParams` are correctly included in 
the fetch request via the cached config, the original concern is addressed. No 
further action is required for this thread.



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

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to