DataTable
's "Select all..." label in BaseSelectionStatus
shows incorrect counts
#2872
Closed
4 tasks
Labels
bug
Report of or fix for something that isn't working as intended
Bugs
There appears to be a bug/regression related to
DataTable
and the "Select all" label in theBaseSelectionStatus
component, introduced by this PR, which seemed to separately resolve a different bug.As seen on the Paragon documentation site, when selecting a row using the
DataTable.ControlledSelect*
sub-components, the "Select all..." label incorrectly says "Select all 3" when there are 7 rows total.I believe the issue is related to this line:
It appears that even without any filters applied,
filteredRows
comes back with an array containing the rows for current page, preventing theitemCount
from being shown.Adjusting the logic to include
hasAppliedFilters
resolves this particular issue:However, it does appear that when a filter is applied, the "Select all..." count is still not quite correct when using the
DataTable.ControlledSelect*
components. For example, this below table has 60 rows total without any filters ("Select all 60" ✅ ); with a filter applied for "Status" column, there are now 55 rows total (itemCount
) but it would state "Select all 25" ⛔ (since the visible page has 25 rows):Tasks
The text was updated successfully, but these errors were encountered: