Table: Fix row count during filter (#89004)

* Table: Fix row count during filter

* Fix pagination ranges
This commit is contained in:
Drew Slobodnjak 2024-06-12 13:54:39 -07:00 committed by GitHub
parent c62cc25513
commit 2fcc4d8cd7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -215,7 +215,7 @@ export const Table = memo((props: Props) => {
if (isCountRowsSet) {
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);
return;
}
@ -287,7 +287,7 @@ export const Table = memo((props: Props) => {
/>
{isSmall ? null : (
<div className={tableStyles.paginationSummary}>
{itemsRangeStart} - {itemsRangeEnd} of {data.length} rows
{itemsRangeStart} - {itemsRangeEnd < rows.length ? itemsRangeEnd : rows.length} of {rows.length} rows
</div>
)}
</div>