Skip to content

fix(Table): update TableContainer to place className on outermost element #6032

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

Merged
merged 3 commits into from
May 12, 2025

Conversation

joshblack
Copy link
Member

@joshblack joshblack commented May 9, 2025

Closes https://github.com/github/primer/issues/5185

Update the Table.Container component to correctly place the provided className on the outermost element.

Changelog

New

Changed

  • Update Table.Container to place provided className on outermost element

Removed

Rollout strategy

  • Patch release

@Copilot Copilot AI review requested due to automatic review settings May 9, 2025 18:55
@joshblack joshblack requested a review from a team as a code owner May 9, 2025 18:55
@joshblack joshblack requested a review from jonrohan May 9, 2025 18:55
Copy link

changeset-bot bot commented May 9, 2025

🦋 Changeset detected

Latest commit: c68e52b

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 Patch

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 staff Author is a staff member label May 9, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes Table.Container so that any passed className and other HTML attributes are applied to its outermost wrapper component.

  • Destructure and forward className and other ...rest props to BoxWithFallback
  • Merge the provided className with the component’s default container class
Comments suppressed due to low confidence (1)

packages/react/src/DataTable/Table.tsx:238

  • Add a unit test for Table.Container to verify that provided className and other HTML attributes (e.g., id, data-*) are applied to the outermost BoxWithFallback element.
<BoxWithFallback {...rest} className={clsx(className, classes.TableContainer)} sx={sxProp}>

@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 May 9, 2025
Copy link
Contributor

github-actions bot commented May 9, 2025

👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks!

Copy link
Contributor

github-actions bot commented May 9, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 96 KB (0%)
packages/react/dist/browser.umd.js 96.2 KB (0%)

@github-actions github-actions bot requested a deployment to storybook-preview-6032 May 9, 2025 19:00 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-6032 May 9, 2025 19:13 Inactive
@joshblack joshblack enabled auto-merge May 12, 2025 14:59
@joshblack joshblack added this pull request to the merge queue May 12, 2025
Merged via the queue into main with commit e0ef7e1 May 12, 2025
35 checks passed
@joshblack joshblack deleted the joshblack-patch-1 branch May 12, 2025 15:26
@primer primer bot mentioned this pull request May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm staff Author is a staff member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants