Skip to content
This repository has been archived by the owner on May 25, 2018. It is now read-only.

Commit

Permalink
removeRow alias added for deleteRow functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
reednj committed Aug 28, 2011
1 parent 0282bbf commit 537ebbe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions Source/jsTable.js
Expand Up @@ -153,6 +153,15 @@ var jsTable = new Class({
this.deleteRow(this.row_list.indexOf(row_id));
},

// aliases for deleteRow. I find remove move natural than delete for some reason.
removeRow: function(row_index) {
this.deleteRow(row_index);
},

removeRowById: function(row_id) {
this.deleteRowById(row_id);
},

getCell: function(row_id, column_id) {
if($type(column_id) == 'string') {
// if the column_id has been passed in as a string, assume it is a column_name
Expand Down
2 changes: 1 addition & 1 deletion Test/test.html
Expand Up @@ -81,7 +81,7 @@
},

delete_last: function() {
this.jst.deleteRow(this.jst.rowCount()-1);
this.jst.removeRow(this.jst.rowCount()-1);
},

deleted: function(row_index) {
Expand Down

0 comments on commit 537ebbe

Please sign in to comment.