Optional client-side sorting of grids
Bug #1697954 reported by
Mike Rylander
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
For grids that either pull the full list of objects from the server, or that build their list based on user input (item status, checkin, checkout, renew, etc), and that use complex data structures in their data provider, there's no simple sorting mechanism. We can provide one, and a branch is forthcoming to do just that.
Changed in evergreen: | |
status: | New → Confirmed |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Here's the branch:
http:// git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ miker/lp- 1697954- client_ side_grid_ sort
From the first commit:
There are several grids (items out, checkin, checkout, item status, etc) that
could benefit from the ability to sort their items, but either the data
provider uses a complex data structure or an API call that doesn't offer
sorting, or the item list is populated by user input rather than a call to the
server. In those cases, sorting is not available. However, if we know that
all the data in the grid is in client memory, it would be reasonable to offer
a client-side sort option.
This commit does that by teaching the grid to accept a "clientsort" feature
and teaching arrayNotifier how to sort the items currently stored. The sort
works over any mix of IDL objects, hashes, and flattened fields, supports
multisort, and pushes "nulls" to the end of the list.
------------
This branch enables client-side sorting on the following grids:
* patron items out
* patron holds (both grids)
* checkin
* checkout
* renew
* item status
* pending patrons
It provides a custom comparator function to fix up mbts.balance_owed, which shows up as a string but should sort as a float.