[GL #161] MinSpareRows after changing trimRows

Tags: #<Tag:0x00007f13604d1758> #<Tag:0x00007f13604d15f0>

In my App I dynamically show and hide rows. With minSpareRow option I’d like to ensure that my table always
has 5 empty rows at its end. This works fine on initial load, but as soon as I set the array for trimRows the spareRows
disappear. If I call updateSettings(spareRows:5) after the call to trimRows, the whole Layout is messed up and the
trimmed Rows are shown again.
Without the timeout nothings happens when I change the trimRows Array.

Any idea why?

        setTimeout(function() {
            var plugin =  hot.getPlugin('trimRows');
            plugin.trimRows( hiddenRowsArr);
            setTimeout(function() {
                 hot.render();
            }, 100);
        }, 100);

Thank you for sharing this issue @johnny.petersen

I have found that when we set some minSpareRows in initialization settings we get wrong amount of spare rows.

I have set minSpareRows to 5 and trim rows array to trimRows: [1, 2, 5] with 10 row dataset and got only 2 spare rows. It is definitely a bug.

demo: http://jsfiddle.net/1jp4cf5q/