1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-03-15 16:29:16 +01:00

Fix: Individual column sorting was not distinct for multiple tables

- The `settings.aoPreSearchCols` array was being shared between every
  table on the table (test using a simple:
    $.fn.dataTableSettings[0].aoColumns ===
    $.fn.dataTableSettings[1].aoColumns
  ) which meant that a column filter aplpied to one table would be
  applied to all others.

- Fix is to deep copy the search model when adding a columns

- Fixes DataTables/DataTables issue #213
This commit is contained in:
Allan Jardine 2013-08-04 10:16:28 +01:00
parent 3f79e6cce4
commit a242a848d5
2 changed files with 2 additions and 2 deletions

View File

@ -1 +1 @@
f799420905648a780426600e304c31cc82e1e56d
bf16c47fd69b5d4460b5fa23d97ed1cb1060e4a3

View File

@ -229,7 +229,7 @@
/* Add a column specific filter */
if ( oSettings.aoPreSearchCols[ iCol ] === undefined || oSettings.aoPreSearchCols[ iCol ] === null )
{
oSettings.aoPreSearchCols[ iCol ] = $.extend( {}, DataTable.models.oSearch );
oSettings.aoPreSearchCols[ iCol ] = $.extend( true, {}, DataTable.models.oSearch );
}
else
{