Summary: | Fix 'clear filter' button behavior on datatable saving their state | ||
---|---|---|---|
Product: | Koha | Reporter: | Thibaud Guillot (thibaud_g) <thibaud.guillot> |
Component: | Acquisitions | Assignee: | Thibaud Guillot (thibaud_g) <thibaud.guillot> |
Status: | RESOLVED FIXED | QA Contact: | Testopia <testopia> |
Severity: | trivial | ||
Priority: | P5 - low | CC: | arthur.suzuki, david, jonathan.druart, lucas, tomascohen, wainuiwitikapark |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
22.11.00, 22.05.09, 21.11.16
|
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 32303 | ||
Attachments: |
Bug 32016: Fix clear filter button behavior
Bug 32016: Fix clear filter button behavior Bug 32016: Fix clear filter button behavior Bug 32016: Remove debug console.log |
Description
Thibaud Guillot (thibaud_g)
2022-10-27 12:13:16 UTC
Since 21.11, not 20.11 :) Created attachment 142713 [details] [review] Bug 32016: Fix clear filter button behavior For example, if you filter by global search input a datatable which saves its previous state when you want to return to this datatable, the backup is recovered in a cookie but the "clear filter" button is disabled because for it the input is empty, the verification of the recovery of the cookie not being made. When loading I therefore added the verification of the cookie and if the search value is not empty then the button can be activated. Test plan: 1) Be sure to have some orders and baskets which can be received 2) Go to 'cgi-bin/koha/acqui/booksellers.pl' and click on 'Receive shipments' 3) Enter something in global search 4) Go to receive and cancel or save to be back on datatable 5) See that you cannot remove your previous input by the 'clear filter' button 6) Apply this patch 7) Repeat steps 3) and 4) 8) See that now you can remove your search Current status: NEW Created attachment 142797 [details] [review] Bug 32016: Fix clear filter button behavior For example, if you filter by global search input a datatable which saves its previous state when you want to return to this datatable, the backup is recovered in a cookie but the "clear filter" button is disabled because for it the input is empty, the verification of the recovery of the cookie not being made. When loading I therefore added the verification of the cookie and if the search value is not empty then the button can be activated. Test plan: 1) Be sure to have some orders and baskets which can be received 2) Go to 'cgi-bin/koha/acqui/booksellers.pl' and click on 'Receive shipments' 3) Enter something in global search 4) Go to receive and cancel or save to be back on datatable 5) See that you cannot remove your previous input by the 'clear filter' button 6) Apply this patch 7) Repeat steps 3) and 4) 8) See that now you can remove your search Signed-off-by: David Nind <david@davidnind.com> Changed assignee :) Created attachment 142977 [details] [review] Bug 32016: Fix clear filter button behavior For example, if you filter by global search input a datatable which saves its previous state when you want to return to this datatable, the backup is recovered in a cookie but the "clear filter" button is disabled because for it the input is empty, the verification of the recovery of the cookie not being made. When loading I therefore added the verification of the cookie and if the search value is not empty then the button can be activated. Test plan: 1) Be sure to have some orders and baskets which can be received 2) Go to 'cgi-bin/koha/acqui/booksellers.pl' and click on 'Receive shipments' 3) Enter something in global search 4) Go to receive and cancel or save to be back on datatable 5) See that you cannot remove your previous input by the 'clear filter' button 6) Apply this patch 7) Repeat steps 3) and 4) 8) See that now you can remove your search Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 22.11. Nice work everyone, thanks! + // table_dt.on('search', console.log); hum? Created attachment 143347 [details] [review] Bug 32016: Remove debug console.log (In reply to Jonathan Druart from comment #7) > + // table_dt.on('search', console.log); > > hum? .. My bad, I forgot it >_< thanks for your feedback Follow-up pushed to master, thanks! Backported to 22.05.x for upcoming 22.05.09 Pushed to 21.11.x for 21.11.16 Not backported to 21.05.x |