handsontable / handsontable

JavaScript data grid with a spreadsheet look & feel. Works with React, Angular, and Vue. Supported by the Handsontable team ⚡
https://handsontable.com
Other
19.26k stars 2.96k forks source link

[Bug]: Multiple sorting resets on the fifth click #10894

Closed KyryllFedorov closed 1 month ago

KyryllFedorov commented 1 month ago

Describe the bug

Hi Handsontable support.

Our company is using your feature in our development. I noticed a strange behavior in multiple sorting. For some reason on the fifth click the multiple sorting is reset. I have attached a video, hope you get it.

Use the Ctrl or CMD button pressed to reproduce in all steps.

Steps for reproduce:

  1. Click on the first column;
  2. Click on the second column;
  3. Switch between the first and second column;
  4. On the fifth click, multiple sorting is reset;

Video/Screenshots

screencast-bpconcjcammlapcogcnnelfmaeghhagj-2024.04.05-03_21_07.webm

Provide a link to the demo with the bug reproduction

https://handsontable.com/docs/javascript-data-grid/rows-sorting/#set-an-initial-sort-order

Handsontable version

14.2.0 (Latest)

Framework version

No response

Your environment

Chrome, Windows 10

adrianszymanski89 commented 1 month ago

Hi @KyryllFedorov

Thank you for contacting us. This is correct behavior. It doesn't really happen on the fifth click but on the 3rd. Filters have just two states: ascending and descending. Then, it returns to default order, and that's what happens in the case you described.

KyryllFedorov commented 1 month ago

Got it. Thank you