Sorting after filtering with minSpareRows set

Tags: #<Tag:0x00007efc5ff05598>

There seems to be an issue with sorting after filtering if minSpareRows is true or set to a number.

For example, if the setting is minSpareRows: 3, then when you filter, then sort, the sort seems to be off by three rows. If its minSpareRows: 1, then the sort is off by 1 row.

Here is a jsFiddle
https://jsfiddle.net/thenoune/fhmfgetv/1/

  1. Filter using the button I’ve added to the bottom of the table. (uses the Filtering API, it also breaks if you manually filter anything)
  2. Sort descending the “A” column, and you can see how the sorting is off by however many extra blank rows you want added. See below in the image how the A column should be descending, but the bottom three rows are out of order (minSpareRows: 3).

I’ve also just noticed that adding a ‘maxRows: 2000’ (or any number value) breaks the sort as well, just in a different way.

Hi @maria.spalding

thank you for sharing the issue.

Our full-stack developer found an issue with using the filtering and sorting plugins and reported it at https://github.com/handsontable/handsontable/issues/4170 so after fixing that issue we should be able to proceed with minSpareRows.

Thank you!