Summary: | New search performed when column filters lose focus | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Staff interface | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | Pushed to stable --- | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | normal | ||
Priority: | P5 - low | CC: | david, gmcharlt, jake.deery, martin.renvoize |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38116 | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: |
This fixes DataTable tables to stop duplicate update queries being made when values are entered for filters and then the focus is lost (for example, clicking somewhere else on the screen).
|
|
Version(s) released in: |
25.05.00,24.11.04
|
Circulation function: | |
Attachments: |
Bug 38827: DataTables - Do not filter when inputs lose focus
Bug 38827: DataTables - Do not filter when inputs lose focus Bug 38827: DataTables - Do not filter when inputs lose focus |
Description
Jonathan Druart
2025-01-06 09:46:54 UTC
Created attachment 176147 [details] [review] Bug 38827: DataTables - Do not filter when inputs lose focus On a table using DataTables and the REST API wrapper with the column filters, if one input is used to filter the table the query will be made twice: when the user stopped typing and when the input will lose the focus. Test plan: Search for patron Open the dev console, "Network" tab In the "Card" column filter enter "0000" Notice that the table is filtered and that a request has been made Click outside of the "Card" input => Without this patch another request (the same) is made and the table updated => With this patch applied no request is made when the input loses the focus. Created attachment 176162 [details] [review] Bug 38827: DataTables - Do not filter when inputs lose focus On a table using DataTables and the REST API wrapper with the column filters, if one input is used to filter the table the query will be made twice: when the user stopped typing and when the input will lose the focus. Test plan: Search for patron Open the dev console, "Network" tab In the "Card" column filter enter "0000" Notice that the table is filtered and that a request has been made Click outside of the "Card" input => Without this patch another request (the same) is made and the table updated => With this patch applied no request is made when the input loses the focus. Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com> Worked for me, nice optimisation. Jake. Created attachment 176197 [details] [review] Bug 38827: DataTables - Do not filter when inputs lose focus On a table using DataTables and the REST API wrapper with the column filters, if one input is used to filter the table the query will be made twice: when the user stopped typing and when the input will lose the focus. Test plan: Search for patron Open the dev console, "Network" tab In the "Card" column filter enter "0000" Notice that the table is filtered and that a request has been made Click outside of the "Card" input => Without this patch another request (the same) is made and the table updated => With this patch applied no request is made when the input loses the focus. Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Pushed for 25.05! Well done everyone, thank you! Nice work everyone! Pushed to 24.11.x for 24.11.04 |