feat(ListView): add pagination to card view and center row count display #36288
+35
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #36235
The Problem
In Apache Superset's dashboard list page
/dashboard/list/pagination controls were visible and working correctly in List View, but inThumbnail/CardView, only the first 25 dashboards were displayed with no pagination controls visible, even when more dashboards existed in the database.Root Cause
The [ListView] component renders two different sub-components based on view mode:
Table View: Uses [TableCollection] component, which internally includes pagination controls
Card View: Uses [CardCollection] component, which only renders cards without any pagination
The pagination state
[pageIndex] [pageSize] [count] [gotoPage]existed in both views via the [useListViewState] hook, but the UI controls to navigate pages were never rendered in card view.The Fix
Added pagination controls after the [CardCollection] component in card view, reusing the existing pagination state
Normal list view (Working Correctly)

tile/ thumbnail (No Pagination)

After Applying Fix


TESTING INSTRUCTIONS
Have >25 dashboards
Switch between:
List view
Thumbnail view
Confirm missing pagination
ADDITIONAL INFORMATION