Bugzilla – Attachment 174193 Details for
Bug 38391
DT's add filters called too many times
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38391: Redraw the filters row on table redraw
Bug-38391-Redraw-the-filters-row-on-table-redraw.patch (text/plain), 1.37 KB, created by
Jonathan Druart
on 2024-11-07 13:20:08 UTC
(
hide
)
Description:
Bug 38391: Redraw the filters row on table redraw
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-11-07 13:20:08 UTC
Size:
1.37 KB
patch
obsolete
>From 52251733bc5ff81573e581ebc2ef12e7c3b4ee92 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 7 Nov 2024 14:16:44 +0100 >Subject: [PATCH] Bug 38391: Redraw the filters row on table redraw > >We used to adjust the filters row when the column visibility changed. >It was working, but at the initialization of the table this event if >fired once per columns. On the items table it means 36x. >When a filtering/sorting, the draw event is triggered once, but the >column-visibility.dt is called 36x > >Try with and without this patch and compare the delay between the query >is received and the page is redrawn. >--- > koha-tmpl/intranet-tmpl/prog/js/datatables.js | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >index 1a0a893c5ab..82c3cd4fbee 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >@@ -1143,7 +1143,7 @@ function _dt_save_restore_state(table_settings, external_filter_nodes={}){ > _dt_add_filters(this, table_dt, filters_options); > } > >- table_dt.on("column-visibility.dt", function(){ >+ table_dt.on("draw", function(){ > if ( add_filters ) { > _dt_add_filters(this, table_dt, filters_options); > } >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38391
:
174193
|
174235
|
174253
|
174268
|
174476
|
174596
|
174683
|
174718