Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,15 @@ You can adjust the width of the resize handle (in px).
}
} );
} );

You can turn off Ajax calls after resizing. It works only on server side implementation of DataTables.

$(document).ready(function() {
$('#example').DataTable( {
"dom": 'Zlfrtip',
"colResize": {
"reloadAfterResize": false
}
} );
} );

13 changes: 11 additions & 2 deletions dataTables.colResize.js
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@
that.s.mouse.targetColumn.width = that.dom.resizeCol.width();

$(document).off('mousemove.ColResize mouseup.ColResize');
this.s.dt.oInstance.fnAdjustColumnSizing();
this.s.dt.oInstance.fnAdjustColumnSizing(that.s.init.reloadAfterResize);
//Table width fix, prevents extra gaps between tables
var LeftWrapper = $(that.s.dt.nTableWrapper).find(".DTFC_LeftWrapper");
var DTFC_LeftWidth = LeftWrapper.width();
Expand Down Expand Up @@ -759,7 +759,16 @@
* @type bool
* @default false
*/
"rtl": false
"rtl": false,

/**
* Call Ajax after column resize. Works only with server side implementation of DataTables
* @property reloadAfterResize
* @type bool
* @default true
*/
"reloadAfterResize" : true

};


Expand Down