EnxDev commented on code in PR #41754:
URL: https://github.com/apache/superset/pull/41754#discussion_r3529934494
##########
superset-frontend/plugins/plugin-chart-ag-grid-table/src/AgGridTableChart.tsx:
##########
@@ -447,7 +480,7 @@ export default function TableChart<D extends DataRecord =
DataRecord>(
isUsingTimeComparison ? renderTimeComparisonVisibility : () => null
}
cleanedTotals={totals || {}}
- showTotals={showTotals}
+ showTotals={showTotals && totals !== undefined}
Review Comment:
Empty {} totals confirmed, and there is a concrete path to it:
processComparisonTotals returns {} when the time-comparison totals result has
no rows, which slipped past totals !== undefined and pinned a blank row. The
gate is now showTotals && totals !== undefined && Object.keys(totals).length >
0, with a RED-first test (totals = {} → no pinned row). Note the
SUM-over-zero-rows case still pins as intended: the backend returns a row with
NULL values there, so the keys are present.
--
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]