Skip to content

Conversation

@BouklifYacine
Copy link
Contributor

No description provided.

Integrated TanStack Table's internal pagination model (getPaginationRowModel) for more robust state management.
Created a standalone, reusable
DataTablePagination
 component located within the
DataTable
 module.
Refactored the Structured View implementation:
Merged TableStructuredCell logic into TableCell for a cleaner architecture.
Moved the expand/collapse click handler to the root cell element to improve hit area.
Added W3C ARIA accessibility attributes (aria-expanded, aria-level, role="row").
Enhanced component robustness by adding safe initializers for pageSize and handling empty data edge cases (e.g., "0-0" range display).
Updated Storybook stories with comprehensive examples, including combined support for pagination, sorting, and structured views.
Resolved linting issues and standardized flex layouts for better cross-browser consistency.
@BouklifYacine BouklifYacine self-assigned this Jan 2, 2026
This was linked to issues Jan 2, 2026
export const DataTablePagination: React.FC<DataTablePaginationProps> = ({
className,
label = {
rowsPerPage: 'Rows per page',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest displaying items instead of Rows per page to prevent to use row

BouklifYacine and others added 3 commits January 5, 2026 13:41
- Move DataTablePagination to src/components/Pagination as standalone component
- Rename row-based props to item-based (rowsPerPage → itemsPerPage, etc.)
- Replace margin utility classes with CSS gap for layout
- Remove deprecated Dropdown label prop
- Change data-sel-role attributes to data-testid
- Use type imports for TypeScript types
- Update DataTable to consume new Pagination component
- Export Pagination from main components index
}

.moonstone-pagination_navigation {
display: flex;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use helper classes flexRow, alignCenter to avoid to add them for each elements

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you added the helper classes, you can now clean up this CSS to remove unnecessary styles :)

}

.moonstone-pagination_navigation {
display: flex;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you added the helper classes, you can now clean up this CSS to remove unnecessary styles :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Manage structured data Manage table pagination

3 participants