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

Removing 100+ table rows yields improper result #6569

Closed
jodator opened this issue Apr 7, 2020 · 2 comments Β· Fixed by ckeditor/ckeditor5-table#305
Closed

Removing 100+ table rows yields improper result #6569

jodator opened this issue Apr 7, 2020 · 2 comments Β· Fixed by ckeditor/ckeditor5-table#305
Assignees
Labels
package:table type:bug This issue reports a buggy (incorrect) behavior.

Comments

@jodator
Copy link
Contributor

jodator commented Apr 7, 2020

πŸ“ Provide detailed reproduction steps (if any)

  1. Steps described by @oleq : I/6545: Introduce TableUtils.removeRows() utility method.Β ckeditor5-table#297 (comment)

βœ”οΈ Expected result

Remove all rows.

❌ Actual result

https://github.com/ckeditor/ckeditor5-table/blob/a8b4d897bc56cfa5c0a780dcc78e8b29961d11fb/src/utils.js#L153

The Array.sort() will:

The sort() method sorts the elements of an array in place and returns the sorted array. The default sort order is ascending, built upon converting the elements into strings, then comparing their sequences of UTF-16 code units values.


If you'd like to see this fixed sooner, add a πŸ‘ reaction to this post.

@jodator jodator added type:bug This issue reports a buggy (incorrect) behavior. package:table labels Apr 7, 2020
@jodator jodator added this to the iteration 31 milestone Apr 7, 2020
@jodator
Copy link
Contributor Author

jodator commented Apr 7, 2020

ps.: Manual test with a huuuge table is welcome (might also show other problems not only with the perf #6568).

@jodator
Copy link
Contributor Author

jodator commented Apr 7, 2020

And fixing this will require review of all the sort() used in table feature code as I found more of them.

@jodator jodator self-assigned this Apr 9, 2020
Reinmar added a commit to ckeditor/ckeditor5-table that referenced this issue Apr 17, 2020
Fix: Resolved various issues with handling bigger tables (due to sorting by indexes issues). Closes ckeditor/ckeditor5#6569. Closes ckeditor/ckeditor5#6544.
mlewand pushed a commit that referenced this issue May 1, 2020
Fix: Resolved various issues with handling bigger tables (due to sorting by indexes issues). Closes #6569. Closes #6544.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:table type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant