Skip to content

Commit

Permalink
feat: Ability to disable column reordering
Browse files Browse the repository at this point in the history
  • Loading branch information
netchampfaris committed Sep 30, 2019
1 parent 1a9c11e commit 31264d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/columnmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ export default class ColumnManager {
}

bindMoveColumn() {
if (this.options.disableReorderColumn) return;

const $parent = $('.dt-row', this.header);

this.sortable = Sortable.create($parent, {
Expand Down
3 changes: 2 additions & 1 deletion src/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,6 @@ export default {
dynamicRowHeight: false,
pasteFromClipboard: false,
showTotalRow: false,
direction: 'ltr'
direction: 'ltr',
disableReorderColumn: false
};

0 comments on commit 31264d1

Please sign in to comment.