Sorting indicator is not changing properly in handsontable

Tags: #<Tag:0x00007efc61a0ce18>

Sorting indicator is not changing properly in handsontable.

Here is the issue which we are facing during sorting.

While sorting (the sort-Indicator) is not changing its position after descending order. The indicator on first click shows ↑(asc), on second click shows ↓(desc) then after every click it stays only in ↓(desc). The indicator is not changing but the sorting logic is working fine.

In the handsontable.full.js, I have made some changes to change the position of the sort-indicator arrow like:

Before: var orderToCssClass = new Map([[_utils.ASC_SORT_STATE, HEADER_CLASS_ASC_SORT], [_utils.DESC_SORT_STATE, HEADER_CLASS_DESC_SORT]]);

After: var orderToCssClass = new Map([[_utils.DESC_SORT_STATE, HEADER_CLASS_DESC_SORT],[_utils.ASC_SORT_STATE, HEADER_CLASS_ASC_SORT]]);

Now it is showing like: on first click shows ↑(asc), on second click shows ↓(desc) on third click it shows ↑, then repeat. Sorting logic is working fine but indicator is not hiding for default order instead showing as ↑.

Expected: on first click shows ↑(asc), on second click shows ↓(desc) on third click it should hide.

Hey @shivam.s

I think that I have already send you a response to this issue on other platform (GH, email). I cannot see anything odd on our official example https://handsontable.com/docs/7.0.2/demo-sorting.html

Can you share your code?

I believe that we can close the issue as there’s no response.