Skip to content

Commit

Permalink
Fix: Actions should not be enacted on disabled columns (dragging over…
Browse files Browse the repository at this point in the history
… a disabled column to another enabled one would trigger an action on the disabled column)

- DD-777
  • Loading branch information
AllanJard committed Sep 27, 2019
1 parent 52fec51 commit b3e7c89
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions js/dataTables.autoFill.js
Expand Up @@ -754,6 +754,7 @@ $.extend( AutoFill.prototype, {
var selected = [];
var dtSettings = dt.settings()[0];
var dtColumns = dtSettings.aoColumns;
var enabledColumns = dt.columns( this.c.columns ).indexes();

// Can't use Array.prototype.map as IE8 doesn't support it
// Can't use $.map as jQuery flattens 2D arrays
Expand All @@ -771,6 +772,10 @@ $.extend( AutoFill.prototype, {
data = dtSettings.oApi._fnGetObjectDataFn( editField )( dt.row( cellIndex.row ).data() );
}

if ( enabledColumns.indexOf(cellIndex.column) === -1 ) {
return;
}

return {
cell: cell,
data: data,
Expand Down

0 comments on commit b3e7c89

Please sign in to comment.