Undoing an insert_row action with trimRows

Tags: #<Tag:0x00007f0b0eaff5a8>

When trying to undo the insert_row action with trimRows enabled, not every row that was added is removed. I think the number of rows that do not get removed is equal to the number of rows that are trimmed. The behavior is only shown if you set the index position to be inserted to null though. I have created a jsfiddle to exhibits this behavior: http://jsfiddle.net/mountaineerfan5/L8mwwqqm/1/

I created a work around and used hot.countRows() as the index and the undo seems to work fine: http://jsfiddle.net/mountaineerfan5/L8mwwqqm/2/

Iā€™m not sure why this occurs though.

Thanks

Hi @melissa

sorry for a delay.

Thank you for sharing the issue. At the first glance, it looks like the wrong indexes are used. If we use a value lower than the number of hiddenRows the undo does not work at all.
The undo/redo plugin has 16 active issues as we are speaking and we are planning to create a bigger fix for all the issues in Q3/Q4. That is why I am not sure if we would be able to find a solid workaround roght now.

ps. the issue has been reported at https://github.com/handsontable/handsontable/issues/4781
Please track changes to this issue for updates.

No problem.
Thanks for the response and for reporting the issue on github.

1 Like

Please update to v 2.0.0+ the issue got solved