From 57cc9f1b2c6bdc76c6dc1a6143eba4f13c30161d Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Wed, 14 Dec 2011 10:50:34 +0000 Subject: [PATCH] Small tidy up of how the column filter state is saved --- media/js/jquery.dataTables.js | 8 +++++--- media/src/api/api.methods.js | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index ea894113..b4c7216a 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -5274,9 +5274,11 @@ else { /* Single column filter */ - oSettings.aoPreSearchCols[ iColumn ].sSearch = sInput+""; - oSettings.aoPreSearchCols[ iColumn ].bRegex = bRegex; - oSettings.aoPreSearchCols[ iColumn ].bSmart = bSmart; + $.extend( oSettings.aoPreSearchCols[ iColumn ], { + "sSearch": sInput+"", + "bRegex": bRegex, + "bSmart": bSmart + } ); _fnFilterComplete( oSettings, oSettings.oPreviousSearch, 1 ); } }; diff --git a/media/src/api/api.methods.js b/media/src/api/api.methods.js index ebf52ac4..0d6795dc 100644 --- a/media/src/api/api.methods.js +++ b/media/src/api/api.methods.js @@ -568,9 +568,11 @@ this.fnFilter = function( sInput, iColumn, bRegex, bSmart, bShowGlobal ) else { /* Single column filter */ - oSettings.aoPreSearchCols[ iColumn ].sSearch = sInput+""; - oSettings.aoPreSearchCols[ iColumn ].bRegex = bRegex; - oSettings.aoPreSearchCols[ iColumn ].bSmart = bSmart; + $.extend( oSettings.aoPreSearchCols[ iColumn ], { + "sSearch": sInput+"", + "bRegex": bRegex, + "bSmart": bSmart + } ); _fnFilterComplete( oSettings, oSettings.oPreviousSearch, 1 ); } };