upenndigitalscholarship / deep

https://deep.pennds.org/
MIT License
3 stars 1 forks source link

Initial sorting of filter results #32

Closed ZacharyLesser closed 1 year ago

ZacharyLesser commented 1 year ago

When user filters records, the initial state of results should be sorted:

1) first by Year -- then 2) within the same year, by DEEP ID

ZacharyLesser commented 1 year ago

Sorting by Year should sort on "Year INT", NOT on "Year (of publication)" (at the Item level) -- this will solve the problem of dates with brackets in them not sorting properly (as currently)

apjanco commented 1 year ago

List.js can call a sort table.sort('year', { order: "desc" }); table.sort('deep_id', { order: "desc"}); should be what we need

apjanco commented 1 year ago

added sort() whenever search() is called. Even though table.update() is called right there, it's not updating the table as expected. Works in console, so seems to be the right call. I tried adding a coroutine on update, but not good.