Search code examples
handsontable

Event after "remove_row" from context menu


When the remove_row option is selected from the context menu, the row is deleted. Is there a way to fire an event with this removal? In particular, is there a way to grab the index of the row and fire a function?


Solution

  • Yes, this is exactly what the afterRemoveRow callback is for. Take a look at all callbacks here.

    The callback function after removing a row is fired with a row index and the amount of removed rows as arguments.

    function (index, amount) {}
    

    Here's a working JSFiddle for demonstration.