From d035fd2d8bb3c90b1ae50fbe631981012dec88d6 Mon Sep 17 00:00:00 2001 From: mark zehr Date: Wed, 9 Sep 2015 14:19:48 -0700 Subject: [PATCH] Save resize state to the original column position when using colReorder extention --- dataTables.colResize.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dataTables.colResize.js b/dataTables.colResize.js index 51459cc..253e834 100644 --- a/dataTables.colResize.js +++ b/dataTables.colResize.js @@ -260,7 +260,7 @@ */ "_fnStateSave": function (oState) { this.s.dt.aoColumns.forEach(function (col, index) { - oState.columns[index].width = col.sWidthOrig; + oState.columns[col._ColReorder_iOrigCol || index].width = col.sWidthOrig; }); }, @@ -433,7 +433,7 @@ //Store the indexes of the columns the mouse is down on var idx = parseInt(that.dom.resizeCol.attr("data-column-index")); - + // the last column has no 'right-side' neighbour // with fixed this can make the table smaller if (that.dom.resizeColNeighbour[0] === undefined) {