Skip to content

Conversation

@koesie10
Copy link

@koesie10 koesie10 commented Jan 30, 2026

This adds a new prop to the DataTable to disable client-side sorting when the DataTable to improve the UX when the table is showing paginated data that is loaded from the server.

Changelog

New

  • Adds a new externalSorting prop to DataTable

Changed

Removed

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

@changeset-bot
Copy link

changeset-bot bot commented Jan 30, 2026

🦋 Changeset detected

Latest commit: e31f210

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Minor

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

@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Jan 30, 2026
@github-actions
Copy link
Contributor

👋 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 integration-tests: skipped manually label to skip these checks.

@koesie10 koesie10 added integration-tests: skipped manually Changes in this PR do not require an integration test and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Jan 30, 2026
Copy link
Member

@francinelucca francinelucca left a 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
Copy link
Member

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

@francinelucca francinelucca removed the integration-tests: skipped manually Changes in this PR do not require an integration test label Jan 30, 2026
@primer-integration
Copy link

👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/12324

@primer-integration
Copy link

Integration test results from github/github-ui:

Passed  CI   Passed
Passed  VRT   Passed
Passed  Projects   Passed

All checks passed!

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.

3 participants