Search highlight: Add ColReorder support

pull/152/head
Allan Jardine 10 years ago
parent 0c67dff78c
commit abbc50179f

@ -58,12 +58,12 @@ $(document).on( 'init.dt.dth', function (e, settings, json) {
$.fn.dataTable.defaults.searchHighlight // default set
) {
table
.on( 'draw.dt.dth column-visibility.dt.dth', function () {
.on( 'draw.dt.dth column-visibility.dt.dth column-reorder.dt.dth', function () {
highlight( body, table );
} )
.on( 'destroy', function () {
// Remove event handler
table.off( 'draw.dt.dth column-visibility.dt.dth' );
table.off( 'draw.dt.dth column-visibility.dt.dth column-reorder.dt.dth' );
} );
// initial highlight for state saved conditions and initial states

@ -2,5 +2,5 @@
SearchHighlight for DataTables v1.0.1
2014 SpryMedia Ltd - datatables.net/license
*/
(function(g,d,a){function e(a,c){a.unhighlight();c.rows({filter:"applied"}).data().length&&a.highlight(c.search().split(" "))}a(d).on("init.dt.dth",function(d,c){var b=new a.fn.dataTable.Api(c),f=a(b.table().body());if(a(b.table().node()).hasClass("searchHighlight")||c.oInit.searchHighlight||a.fn.dataTable.defaults.searchHighlight)b.on("draw.dt.dth column-visibility.dt.dth",function(){e(f,b)}).on("destroy",function(){b.off("draw.dt.dth column-visibility.dt.dth")}),b.search()&&e(f,b)})})(window,document,
jQuery);
(function(g,d,a){function e(a,c){a.unhighlight();c.rows({filter:"applied"}).data().length&&a.highlight(c.search().split(" "))}a(d).on("init.dt.dth",function(d,c){var b=new a.fn.dataTable.Api(c),f=a(b.table().body());if(a(b.table().node()).hasClass("searchHighlight")||c.oInit.searchHighlight||a.fn.dataTable.defaults.searchHighlight)b.on("draw.dt.dth column-visibility.dt.dth column-reorder.dt.dth",function(){e(f,b)}).on("destroy",function(){b.off("draw.dt.dth column-visibility.dt.dth column-reorder.dt.dth")}),
b.search()&&e(f,b)})})(window,document,jQuery);

Loading…
Cancel
Save