amaannawab923 commented on code in PR #35343:
URL: https://github.com/apache/superset/pull/35343#discussion_r2426485247
##########
superset-frontend/plugins/plugin-chart-ag-grid-table/src/buildQuery.ts:
##########
@@ -218,15 +218,79 @@ const buildQuery: BuildQuery<TableChartFormData> = (
sortByFromOwnState = [[sortByItem?.key, !sortByItem?.desc]];
}
+ // Note: In Superset, "columns" are dimensions and "metrics" are measures,
+ // but AG Grid treats them all as "columns" in the UI
+ let orderedColumns = columns;
+ let orderedMetrics = metrics;
+
+ if (
+ isDownloadQuery &&
+ ownState.columnOrder &&
+ Array.isArray(ownState.columnOrder)
+ ) {
+ const findMatchingItem = <T>(
+ items: T[],
Review Comment:
Do we have any interface for matching item , T is generic
--
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]