I am running into an issue when attempting to delete a row that doesn’t appear to be selected. I have a button that launches a modal window within a table—another button inside the modal deletes a particular row. When calling the alter method, instead of deleting the row from the index passed to the function, it removes a few columns from the last row.
I have configured a fiddle that exposes the problem. The first column in the table is an example of the desired effect. The last column represents a previous topic that addressed how to delete a row. Clicking the button from the last column works as expected. When using the first column, it appears that calling hot.getSelectedLast() returns an undefined object. Therefore, even if you attempt to delete a row by sending the correct index, it fails.
My observation is that the hot object doesn’t respond well to being called from a modal window. Is there a workaround to allow a button in a modal to alter the table?