-
-
Notifications
You must be signed in to change notification settings - Fork 21k
New Feature Pagination #4704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
New Feature Pagination #4704
Conversation
2) ensure page limits are passed on load 3) co-pilot review comments (n+1 query) 4)
2) ensure page limits are passed on load 3) co-pilot review comments (n+1 query) 4) refresh lists after insert/delete.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds pagination support across list and table views by wiring a new TablePagination
component through the UI, extending API client calls to accept page & limit parameters, and updating server-side controllers and services to handle paginated queries.
- Introduce a reusable
TablePagination
component in the UI - Update list views to manage
currentPage
,pageLimit
,total
and call APIs with pagination - Extend client API methods, controllers, and services to accept and apply
page
/limit
parameters
Reviewed Changes
Copilot reviewed 50 out of 50 changed files in this pull request and generated 2 comments.
Show a summary per file
File Pattern | Description |
---|---|
packages/ui/src/views/*/index.jsx | Added pagination state/hooks and rendered <TablePagination> |
packages/ui/src/ui-component/pagination/TablePagination.jsx | New reusable pagination component |
packages/ui/src/api/*.js | Updated getAll* endpoints to accept { params: { page, limit } } |
packages/server/src/utils/pagination.ts | New utility to parse page and limit from req.query |
packages/server/src/services/*/index.ts | Updated services to apply .skip() /.take() when page>0 & limit>0 |
packages/server/src/controllers/*/index.ts | Controllers now call services with parsed page and limit |
packages/ui/src/ui-component/table/DocumentStoreTable.jsx | New table component for document store view |
Comments suppressed due to low confidence (1)
packages/ui/src/views/variables/index.jsx:343
- Filtering the variable list client-side after pagination limits results to the current page only, so search won’t find matches on other pages. Consider passing the search query to the API so filtering happens server-side before pagination.
{variables.filter(filterVariables).map((variable, index) => (
… API key services - Added check for empty entities in DocumentStoreDTO.fromEntities to return an empty array. - Updated condition in getAllDocumentStores to handle total count correctly, allowing for zero total. - Refined logic in getAllApiKeys to check for empty keys and ensure correct API key retrieval. - Adjusted UI components to safely handle potential undefined apiKeys array.
Adding Pagination Support (Table view and Card view) for the following
The following will NOT be taken up in this PR and will be handled separately shortly.