Skip to content
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

fix: Updates the interface for DataTableHeader to include isSortable #18295

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

cknabe
Copy link
Contributor

@cknabe cknabe commented Jan 3, 2025

Closes #18172

Minor update to the DataTableHeader interface to handle a header having its own isSortable, instead of needing to be redeclared when passing into getHeaderProps.

I picked a random bug/feature to refresh my knowledge of contributing to Carbon. If this fix isn't wanted/needed, no problem.

Changelog

  • DataTableHeader now has isSortable in its interface
  • getHeaderProps now checks for isSortable in the header first ~ there may be backwards incompatibilities or side effects

Testing / Reviewing

  • I added a minor test that verifies a column does not allow sorting. Adding testing updates for this change seems like overkill, or possibly unwarranted. We can remove the testing updates if desired.

@cknabe cknabe requested a review from a team as a code owner January 3, 2025 21:22
Copy link

netlify bot commented Jan 3, 2025

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit f02494b
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/677c44534fc9300008f28497
😎 Deploy Preview https://deploy-preview-18295--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 3, 2025

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit f02494b
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/677c4453b137500008040ad5
😎 Deploy Preview https://deploy-preview-18295--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 3, 2025

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit f02494b
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/677c445394ddf6000989ace4
😎 Deploy Preview https://deploy-preview-18295--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

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.

[Bug]: DataTableHeader doesn't have an isSortable property
1 participant