-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.Disputed bug is accepted as valid or Feature accepted as desired to be added.
Description
Is your feature request related to a problem?
ShadCN provides a DataTable component, but it assumes all data is available on the client side. However, Laravel's pagination system only returns a chunk of data (e.g., 30 items at a time) along with links for navigation (previous, next, first, last). This makes it difficult to integrate the DataTable seamlessly with an Inertia.js setup that relies on server-side pagination.
Describe the solution you'd like.
The ShadCN DataTable should support server-side pagination when used with Inertia.js. Specifically:
- It should be able to fetch and display paginated data dynamically.
- The pagination controls should work with Laravel’s response format (handling
linksfor navigation). - Sorting and filtering should also be compatible with backend-driven queries rather than client-side-only operations.
Describe alternatives you've considered.
- Manually modifying the existing ShadCN DataTable to fetch data from the server, but this requires significant custom logic.
- Using third-party table libraries like React Table, but this requires additional styling and does not integrate well with ShadCN.
- Implementing a custom table component from scratch, but this is time-consuming and defeats the purpose of using ShadCN.
Other
A working example or an official guide on handling server-side pagination with ShadCN and Inertia would also be helpful.
Metadata
Metadata
Assignees
Labels
status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.Disputed bug is accepted as valid or Feature accepted as desired to be added.
Type
Projects
Status
Ready