-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove row and sort problem #1078
Labels
Comments
I think this is the same underlying bug as #1072 |
Until the remove row with sorting can be resolved, I've resorted to disabling remove_row from the context menu if a table has been sorted using the following HOT option: contextMenu: {
items: {
"row_above": {},
"row_below": {},
"hsep1": "---------",
"col_left": {},
"col_right": {},
"hsep2": "---------",
"remove_row" : {
disabled: function() {
//Find parent handsontable
var $container = $(this).parents('.handsontable');
/**
* Disable if table has been sorted because of bugs
* see https://github.com/warpech/jquery-handsontable/issues/1072
* and https://github.com/warpech/jquery-handsontable/issues/1078
**/
if($container.handsontable('getInstance').sortIndex && $container.handsontable('getInstance').sortIndex.length > 0) {
return true;
}
return false;
}
},
"remove_col": {},
"hsep3": "---------",
"undo": {},
"redo": {}
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I remove a row from an ordered table, the ordering is messed up:
http://jsfiddle.net/BaBZT/1/
The text was updated successfully, but these errors were encountered: