craigsapp / website-polish-scores

Front-end for digital transcriptions of the Polish Music Heritage in Open Access project
https://polishscores.org
3 stars 1 forks source link

Preserve sort order for next/previous work buttons #73

Closed craigsapp closed 2 years ago

craigsapp commented 2 years ago

When moving from the browse page to the work page, preserve the order of the works in the browse table when clicking on the next/previous work buttons on the work page.

craigsapp commented 2 years ago

Fixed with commit https://github.com/craigsapp/website-polish-scores/commit/31ec263d6a5c55a82ca83d478d0c2e735fd8b8d9

The problem is that the browse table sorts the search results, but does not store the sorted list in popc2.VARS.SEARCH_RESULTS. It would probably be a good idea to do that, but in this case I apply the same sorting method to the search results whenever the next/previous work button is pressed (which produces the same result).