Table: Restore previous footer behavior of reducers applying to filtered data (#111041)

* Table: Restore previous footer behavior of reducers applying to filtered data

* update e2e to match new behavior
This commit is contained in:
Paul Marbach 2025-09-12 17:33:06 -04:00 committed by GitHub
parent cb37539ed7
commit f258d8a417
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View file

@ -11,7 +11,7 @@ const waitForTableLoad = async (loc: Page | Locator) => {
};
test.describe('Panels test: Table - Footer', { tag: ['@panels', '@table'] }, () => {
test('Footer unaffected by filtering', async ({ gotoDashboardPage, selectors, page }) => {
test('Footer affected by filtering', async ({ gotoDashboardPage, selectors, page }) => {
const dashboardPage = await gotoDashboardPage({
uid: DASHBOARD_UID,
queryParams: new URLSearchParams({ editPanel: '4' }),
@ -51,7 +51,7 @@ test.describe('Panels test: Table - Footer', { tag: ['@panels', '@table'] }, ()
dashboardPage
.getByGrafanaSelector(selectors.components.Panels.Visualization.TableNG.Footer.Value)
.nth(minColumnIdx)
).toHaveText(minReducerValue);
).not.toHaveText(minReducerValue);
});
test('Footer unaffected by sorting', async ({ gotoDashboardPage, selectors, page }) => {

View file

@ -679,7 +679,7 @@ export function TableNG(props: TableNGProps) {
),
renderSummaryCell: () => (
<SummaryCell
rows={rows}
rows={sortedRows}
footers={footers}
field={field}
colIdx={i}
@ -709,10 +709,11 @@ export function TableNG(props: TableNGProps) {
maxRowHeight,
numFrozenColsFullyInView,
onCellFilterAdded,
rows,
rowHeight,
rowHeightFn,
rows,
setFilter,
sortedRows,
showTypeIcons,
theme,
timeRange,