From 2c3231bb7cb5a3c769e5c29e6796664395cc1cd0 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Tue, 7 Oct 2014 11:27:45 +0100 Subject: [PATCH] Fix: Nested tables would cause the parent table to update its sort when a child does its own sorting --- integration/jqueryui/dataTables.jqueryui.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/integration/jqueryui/dataTables.jqueryui.js b/integration/jqueryui/dataTables.jqueryui.js index aa9625a..21ad7b5 100644 --- a/integration/jqueryui/dataTables.jqueryui.js +++ b/integration/jqueryui/dataTables.jqueryui.js @@ -86,7 +86,11 @@ DataTable.ext.renderer.header.jqueryui = function ( settings, cell, column, clas .appendTo( cell ); // Attach a sort listener to update on sort - $(settings.nTable).on( 'order.dt', function ( e, settings, sorting, columns ) { + $(settings.nTable).on( 'order.dt', function ( e, ctx, sorting, columns ) { + if ( settings !== ctx ) { + return; + } + var colIdx = column.idx; cell