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:
@@ -11,7 +11,7 @@ const waitForTableLoad = async (loc: Page | Locator) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
test.describe('Panels test: Table - Footer', { tag: ['@panels', '@table'] }, () => {
|
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({
|
const dashboardPage = await gotoDashboardPage({
|
||||||
uid: DASHBOARD_UID,
|
uid: DASHBOARD_UID,
|
||||||
queryParams: new URLSearchParams({ editPanel: '4' }),
|
queryParams: new URLSearchParams({ editPanel: '4' }),
|
||||||
@@ -51,7 +51,7 @@ test.describe('Panels test: Table - Footer', { tag: ['@panels', '@table'] }, ()
|
|||||||
dashboardPage
|
dashboardPage
|
||||||
.getByGrafanaSelector(selectors.components.Panels.Visualization.TableNG.Footer.Value)
|
.getByGrafanaSelector(selectors.components.Panels.Visualization.TableNG.Footer.Value)
|
||||||
.nth(minColumnIdx)
|
.nth(minColumnIdx)
|
||||||
).toHaveText(minReducerValue);
|
).not.toHaveText(minReducerValue);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Footer unaffected by sorting', async ({ gotoDashboardPage, selectors, page }) => {
|
test('Footer unaffected by sorting', async ({ gotoDashboardPage, selectors, page }) => {
|
||||||
|
|||||||
@@ -679,7 +679,7 @@ export function TableNG(props: TableNGProps) {
|
|||||||
),
|
),
|
||||||
renderSummaryCell: () => (
|
renderSummaryCell: () => (
|
||||||
<SummaryCell
|
<SummaryCell
|
||||||
rows={rows}
|
rows={sortedRows}
|
||||||
footers={footers}
|
footers={footers}
|
||||||
field={field}
|
field={field}
|
||||||
colIdx={i}
|
colIdx={i}
|
||||||
@@ -709,10 +709,11 @@ export function TableNG(props: TableNGProps) {
|
|||||||
maxRowHeight,
|
maxRowHeight,
|
||||||
numFrozenColsFullyInView,
|
numFrozenColsFullyInView,
|
||||||
onCellFilterAdded,
|
onCellFilterAdded,
|
||||||
|
rows,
|
||||||
rowHeight,
|
rowHeight,
|
||||||
rowHeightFn,
|
rowHeightFn,
|
||||||
rows,
|
|
||||||
setFilter,
|
setFilter,
|
||||||
|
sortedRows,
|
||||||
showTypeIcons,
|
showTypeIcons,
|
||||||
theme,
|
theme,
|
||||||
timeRange,
|
timeRange,
|
||||||
|
|||||||
Reference in New Issue
Block a user