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

Table Viz - Sorting by multiple columns no longer works #19919

Closed
2 of 3 tasks
stevetracvc opened this issue May 2, 2022 · 3 comments
Closed
2 of 3 tasks

Table Viz - Sorting by multiple columns no longer works #19919

stevetracvc opened this issue May 2, 2022 · 3 comments
Labels
#bug Bug report

Comments

@stevetracvc
Copy link
Contributor

stevetracvc commented May 2, 2022

A recent (Dec) commit to the table viz added something for case-insensitive sorting. Unfortunately, this also broke the ability to shift-click and sort by multiple columns.

How to reproduce the bug

  1. Explore a table (or find one in a dashboard)
  2. Click on the header of an alphanumeric column to sort by that column (make sure there are multiple rows with the same value for this column, eg Video Game Sales -> Overview -> Top 10 Games table, sort by platform column)
  3. Shift click on any other column to also sort by that column (eg, global_sales column)
  4. See that nothing changed

Expected results

Any rows with ties in the first column should then be sorted by the second column.

Actual results

It only sorts by the first column

Screenshots

unsorted:
table_unsorted

Sorted by Platform
table_sortby-platform

Sorted by Platform AND Global Sales (broken)
table_sortby-platform-globalsales

How it should sort
table_sortby-platform-globalsales-correct

Environment

  • superset version: master

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.
@rusackas
Copy link
Member

I think this was fixed but never closed. Happy to reopen if I'm misinterpreting

@LeulAria
Copy link

LeulAria commented Jan 22, 2024

what's the solution here ? didn't get the context
was implementing multiple sort, added
yet im getting single value in the array of sorts for the sorting state

{
   ...,
   state:  {
       sorting
   }
   manualSorting: true,
   enableMultiSort: true,
   onSortingChange: setSorting
}

@stevetracvc
Copy link
Contributor Author

@LeulAria what version of superset are you using? I wrote a fix and it was merged a couple years ago.

You have to shift + click when picking columns for the multi sort, do you have the shift key bound to some other action?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report
Projects
None yet
Development

No branches or pull requests

3 participants