Skip to content

Commit a0bb3de

Browse files
committed
Fix: Don't fill cells which have their column marked as disabled for being able to trigger autofill
- DD-777
1 parent 6290ad5 commit a0bb3de

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

js/dataTables.autoFill.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,7 @@ $.extend( AutoFill.prototype, {
946946

947947
var dt = this.s.dt;
948948
var cell;
949+
var columns = dt.columns( this.c.columns ).indexes();
949950

950951
// Potentially allow modifications to the cells matrix
951952
this._emitEvent( 'preAutoFill', [ dt, cells ] );
@@ -966,7 +967,9 @@ $.extend( AutoFill.prototype, {
966967
for ( var j=0, jen=cells[i].length ; j<jen ; j++ ) {
967968
cell = cells[i][j];
968969

969-
cell.cell.data( cell.set );
970+
if ( columns.indexOf(cell.index.column) !== -1 ) {
971+
cell.cell.data( cell.set );
972+
}
970973
}
971974
}
972975

0 commit comments

Comments
 (0)