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

Alphanumeric sorting initial sort #3951

Open
ptasker opened this issue Nov 17, 2023 · 4 comments · May be fixed by #4602
Open

Alphanumeric sorting initial sort #3951

ptasker opened this issue Nov 17, 2023 · 4 comments · May be fixed by #4602

Comments

@ptasker
Copy link

ptasker commented Nov 17, 2023

Description

We're using the DataTable component and have a column that is using the 'alphanumeric' sort. Clicking the column header sorts the table correctly. Howver, on load, we have set this column as the initialSortColumn and the table is not initially sorted using the 'alphanumeric' sort, but using the 'basic' algo.

Steps to reproduce

  1. Implement a new DataTable component. Adding columns, with one column using the 'alphanumeric' sort
  2. Have data that has integers in the values, like var1, var11, var103, var2, var22, var203 etc.
  3. On the DataTable component, set the initialSortColumn to the column that has the 'alphanumeric' sort set
  4. On load the table will be sorted using a 'basic' algo. Clicking on the table column header will make it sort using the alphanumeric algo.

Version

latest

Browser

No response

@ptasker ptasker added the bug Something isn't working label Nov 17, 2023
@lesliecdubs
Copy link
Member

Thanks for filing this bug!

@joshblack could you provide an estimate of size for this and we'll see if we can prioritize? I'm wondering if we might be able to fit this into an upcoming FR cycle for a PRC engineer.

@joshfarrant
Copy link

Hi 👋 I hope I'm not treading on any toes here by opening a PR for this issue but, as I mentioned in the linked PR, I wanted to explore the code a bit and thought I'd grab an open issue as a starting point.

Thoughts and feedback on #3967 would be appreciated, thanks 🙂

@bwittenberg
Copy link
Contributor

bwittenberg commented May 13, 2024

Hello! I was interested in contributing to Primer and I have a fix for this issue on a local branch. It seems like I might need permission to push a branch, because I received a 403 response when I tried. If this is user error, feel free to let me know and I'll look into it.

If you aren't interested in a contribution, no worries!

Update: I realized that I could open a PR by following the steps here: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork

@bwittenberg
Copy link
Contributor

👋 @joshblack , I see you reviewed a previous PR related to this issue so I wanted to let you know that I attempted to fix with #4602.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment