warpech/jquery-handsontable — pull request #788 by rb-cohen (2013-06-12 17:35:34+00:00)
Title: Provide the alter arguments to the afterChange hook

On a user inserting a new row (from the context menu) I needed to tell the server to shift the data at index X by rows Y.

I couldn't find a way to get X and Y from a hook, but the proposed change provides the arguments given to grid.alter to any callbacks.

This removes the need to calculate which rows have changed based on the changes array.

Alternatively, what about firing more specific events? Something like:
instance.PluginHook.runHooks('alter:insertRow', index, amount);
instance.PluginHook.runHooks('alter:insertCol', index, amount);
.. etc ..