Skip to content

Commit

Permalink
Fix #864 - Implement a 'destroy' method on Slick.ColumnPicker.
Browse files Browse the repository at this point in the history
  • Loading branch information
mleibman committed Jan 20, 2014
1 parent 9516f68 commit 33e75b0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion controls/slick.columnpicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@

}

function destroy() {
grid.onHeaderContextMenu.unsubscribe(handleHeaderContextMenu);
grid.onColumnsReordered.unsubscribe(updateColumnOrder);
$menu.remove();
}

function handleHeaderContextMenu(e, args) {
e.preventDefault();
$menu.empty();
Expand Down Expand Up @@ -136,7 +142,8 @@
init();

return {
"getAllColumns": getAllColumns
"getAllColumns": getAllColumns,
"destroy": destroy
};
}

Expand Down

0 comments on commit 33e75b0

Please sign in to comment.