mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Table: Fix row count during filter (#89004)
* Table: Fix row count during filter * Fix pagination ranges
This commit is contained in:
parent
c62cc25513
commit
2fcc4d8cd7
@ -215,7 +215,7 @@ export const Table = memo((props: Props) => {
|
|||||||
|
|
||||||
if (isCountRowsSet) {
|
if (isCountRowsSet) {
|
||||||
const footerItemsCountRows: FooterItem[] = [];
|
const footerItemsCountRows: FooterItem[] = [];
|
||||||
footerItemsCountRows[0] = headerGroups[0]?.headers[0]?.filteredRows.length.toString() ?? data.length.toString();
|
footerItemsCountRows[0] = rows.length.toString() ?? data.length.toString();
|
||||||
setFooterItems(footerItemsCountRows);
|
setFooterItems(footerItemsCountRows);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -287,7 +287,7 @@ export const Table = memo((props: Props) => {
|
|||||||
/>
|
/>
|
||||||
{isSmall ? null : (
|
{isSmall ? null : (
|
||||||
<div className={tableStyles.paginationSummary}>
|
<div className={tableStyles.paginationSummary}>
|
||||||
{itemsRangeStart} - {itemsRangeEnd} of {data.length} rows
|
{itemsRangeStart} - {itemsRangeEnd < rows.length ? itemsRangeEnd : rows.length} of {rows.length} rows
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user