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(DataTable): add sorting null values (NEW) #13161

Merged
merged 2 commits into from
Feb 16, 2023
Merged

fix(DataTable): add sorting null values (NEW) #13161

merged 2 commits into from
Feb 16, 2023

Conversation

jsehull
Copy link
Contributor

@jsehull jsehull commented Feb 15, 2023

Closes #12696

Changelog

New

  • fix ability to sort data even if it has null values in rows

Changed

  • n/a

Removed

  • n/a

Testing / Reviewing

My basic findings BEFORE fix

  • A: single null value in one column did NOT break sorting
  • B: multiple null values in one column DID break sorting
  1. open packages/react/src/components/DataTable/stories/shared.js
  2. under const rows set various values to null (i.e. multiple name keys set to null for column sorting)
  3. open the Storybook site to test in browser: Storybook > DataTable > Sorting > Default (or anywhere that has sorting enabled)
  4. test the sort feature: hover over column headers and cycle clicks at least 3 times (3 different sorting comparison types), but also a bunch of times 💪
  5. confirm both A and B findings (above) sort as expected now

@netlify
Copy link

netlify bot commented Feb 15, 2023

Deploy Preview for carbon-components-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit a87efad
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/63ee479b7248ca00087fe615
😎 Deploy Preview https://deploy-preview-13161--carbon-components-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 settings.

@netlify
Copy link

netlify bot commented Feb 15, 2023

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit a87efad
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/63ee479b719bd900080c29af
😎 Deploy Preview https://deploy-preview-13161--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 settings.

Copy link
Collaborator

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

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

Working as expected! Thanks for taking the time to contribute a fix 💪🏻 🎉 ✅

Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

GitHub is super picky about the syntax to auto-close linked issues. In the PR body it has to be exactly Closes #12696.

I fixed it in the PR body but just wanted to give you a heads up!

@kodiakhq kodiakhq bot merged commit a719141 into carbon-design-system:main Feb 16, 2023
@jsehull
Copy link
Contributor Author

jsehull commented Feb 16, 2023

@tay1orjones thank you I did not know that!

remolueoend pushed a commit to remolueoend/carbon that referenced this pull request Feb 17, 2023
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
@jsehull jsehull deleted the 12696/datatable-sorting-and-null branch March 2, 2023 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Data Table - Sorting and null
3 participants