-
Notifications
You must be signed in to change notification settings - Fork 37
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
feat(InfiniteQueryTable): add infinite query table for paginated react query hooks #973
Conversation
1f70643
to
f83abcb
Compare
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.
Some minor comments.
Thanks for your contribution and good work.
packages/ui/package.json
Outdated
@@ -96,6 +98,9 @@ | |||
"@types/uuid": "^9.0.0", | |||
"amazon-cognito-identity-js": "^6.2.0", | |||
"cross-fetch": "^3.1.6", | |||
"lodash.chunk": "^4.2.0", |
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.
All lodash.* should be added to the dependencies (given that we might use it other occasions). Otherwise, consumers will not install them
|
||
/** | ||
* Extends the Cloudscape Table component with pagination options for @tanstack/react-query infinite query hooks. | ||
* Compatible with generated hooks for paginated operations from AWS PDK Type Safe API. |
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.
Better to provide an URL from PDK doc, something like,
<a href='http://example.com' target="_blank" rel="noreferrer noopener">
…t query hooks Users of PDK's Type Safe API can make use of react query hooks generated from their API model. "Infinite query" hooks are generated for paginated operations. This change adds a table component which accepts the result of such a hook, and manages pagination by interacting with the hook, simplifying the effort required to build paginated tables when using Type Safe API and Northstar in tandem.
f83abcb
to
9a7cfac
Compare
🎉 This PR is included in version @aws-northstar/ui-v1.1.10 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Users of PDK's Type Safe API can make use of react query hooks generated from their API model. "Infinite query" hooks are generated for paginated operations.
This change adds a table component which accepts the result of such a hook, and manages pagination by interacting with the hook, simplifying the effort required to build paginated tables when using Type Safe API and Northstar in tandem.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.