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

Sorting indicator moves incorrectly when adding a column #6397

Closed
aninde opened this issue Oct 28, 2019 · 10 comments
Closed

Sorting indicator moves incorrectly when adding a column #6397

aninde opened this issue Oct 28, 2019 · 10 comments

Comments

@aninde
Copy link
Contributor

aninde commented Oct 28, 2019

Description

Sorting indicator (arrow) moves incorrectly to the left when adding a column to the left.
The error does not occur when adding the right column.

Steps to reproduce

  1. Open demo https://jsfiddle.net/aninde/gLzt0c2x/
  2. Sort second column.
  3. Insert to the left of sorted column

Actual result

Sorting indicator (arrow) moves to the new added header and no longer exist on previous sorted column.
Screen Recording 2019-10-28 at 17 16 06 2019-10-28 17_24_22

Expected result

Sorting indicator should not move. It should stay where it is used, like when adding column on the right site.

Demo

v. 7.2.2 https://jsfiddle.net/aninde/gLzt0c2x/

Your environment

  • Handsontable version: at least 6+, before, sorting was without an indicator. Can't be checked.
  • Browser Name and version: any
  • Operating System: any
@mrpiotr-dev
Copy link
Contributor

multiColumnSorting has the same bug.
Moreover, you can reproduce this issue by removing columns.

@wojciechczerniak
Copy link
Contributor

@aninde Please re-check this issue with v8.0.0-beta

@AMBudnik
Copy link
Contributor

it works the same on my Catalina while applying 8.0.0's beta https://jsfiddle.net/tybrnL50/

@aninde
Copy link
Contributor Author

aninde commented Jan 2, 2020

@AMBudnik is right. Sadly this bug occurs also in v8.0.0-beta. It is possible to call it by removing the sorted column, like @swistach wrote.
https://jsfiddle.net/ymdq85rn/

multiColumnSorting / Firefox 71 / Catalina 10.15
6397-8 0 0-ff

@AMBudnik
Copy link
Contributor

Remains the same in 8.0.0-beta2-rev14 https://jsfiddle.net/AMBudnik/Lxbrpt53/

@wojciechczerniak wojciechczerniak added this to the August 2020 milestone Aug 4, 2020
@wszymanski wszymanski assigned wszymanski and unassigned wszymanski Aug 6, 2020
@wszymanski
Copy link
Contributor

wszymanski commented Aug 6, 2020

Related to the fact that a newly created row's index replaces the previous physical index. A physical index isn't really a unique value. However, we were saving some states for particular columns/rows threatening physical index as an ID.

@AMBudnik
Copy link
Contributor

Demo updated to v8.0.0 https://jsfiddle.net/gb126Lre/ (works the same)

wszymanski added a commit that referenced this issue Oct 5, 2020
wszymanski added a commit that referenced this issue Oct 5, 2020
wszymanski added a commit that referenced this issue Oct 8, 2020
wszymanski added a commit that referenced this issue Oct 9, 2020
…ames may be not accurate yet) and wrote unit tests for the object #6397
wszymanski added a commit that referenced this issue Oct 13, 2020
wszymanski added a commit that referenced this issue Oct 19, 2020
wszymanski added a commit that referenced this issue Oct 19, 2020
wszymanski added a commit that referenced this issue Oct 19, 2020
@aninde
Copy link
Contributor Author

aninde commented Nov 3, 2020

This issue will be fixed by the version upcoming v8.2.0 on all supported browsers except Internet Explorer 11 on Windows 10.

Demo https://jsfiddle.net/aninde/09edasc2/

On IE, the newly added column on the left has an additional invalid indicator. When you add a column to the right of a sorted column, the indicator is not added. Sorting pointer renders the same regardless of the Handsontable version

order of gifs:

  1. v8.2.0 - extra indicator without order number and proper indicator at the column B
  2. v8.0.0 - indicator is moved to the left, order numbers stays
  3. v7.4.2 - indicator is moved to the left, order numbers stays
    8 2 0 8 0 0 7 4 2

@aninde
Copy link
Contributor Author

aninde commented Nov 6, 2020

Today's version of 8.2.0 works beautifully on IE 11/ Windows 10 and other supported browsers. @jansiegel well done!

This issue will be fixed by the upcoming v8.2.0.
Demo https://jsfiddle.net/aninde/o5ujrpnb/

@AMBudnik
Copy link
Contributor

The issue is closed as solved for v 8.2.0

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

No branches or pull requests

5 participants