-
Notifications
You must be signed in to change notification settings - Fork 647
DataTable: Add externalSorting prop to disable client-side sorting #7488
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?
Conversation
🦋 Changeset detectedLatest commit: e31f210 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Or, apply the |
francinelucca
left a comment
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.
one change request, other than that LGTM!
Also let's not skip the integration tests 🙏🏽
| * table. Use this when sorting is handled server-side. The `onToggleSort` | ||
| * callback will still be fired when a sortable column header is clicked. | ||
| */ | ||
| externalSorting?: boolean |
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.
let's add this new prop to the DataTable props file as well -> https://github.com/primer/react/blob/main/packages/react/src/DataTable/DataTable.docs.json
|
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/12324 |
This adds a new prop to the
DataTableto disable client-side sorting when theDataTableto improve the UX when the table is showing paginated data that is loaded from the server.Changelog
New
externalSortingprop toDataTableChanged
Removed
Rollout strategy
Testing & Reviewing
Merge checklist