Skip to content

Multi sort doesn't get removed when clicking on other column header without shift key #6070

@bisnurana

Description

@bisnurana

TanStack Table version

https://tanstack.com/table/latest/docs/framework/react/examples/sorting

Framework/Library version

https://tanstack.com/table/latest/docs/framework/react/examples/sorting

Describe the bug and the steps to reproduce it

Hi,
I found the multi-sort behavior is not correct when clicked on column with multi-short without shift key. I was able to reproduce it in official tanstack react table example page https://tanstack.com/table/latest/docs/framework/react/examples/sorting

Could you check if this needs to be fixed or is there some workaround?

Steps to reproduce:

  1. Open https://tanstack.com/table/latest/docs/framework/react/examples/sorting
  2. Hold shift key and click on first name
  3. Hold shift key and click on last name
  4. Do not hold shift key and click on last name

Expected:
4. Multisort should be removed and sorting should be applied to last name column.

UX references:

  1. https://v4.mui.com/components/data-grid/sorting#multi-column-sorting
  2. https://www.ag-grid.com/example/

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

https://tanstack.com/table/latest/docs/framework/react/examples/sorting

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

None

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions