dspace-angular icon indicating copy to clipboard operation
dspace-angular copied to clipboard

Browse by metadata: If you already selected a value to browse by (value in url) & then search (startsWith) doesn't work

Open MarieVerdonck opened this issue 1 year ago • 1 comments

Describe the bug If you select a browse value in a metadata value browse (add value={browse-value} to url), but then want to search for (another) browse value & start to use the search it won't show any results even if there are browse values that start with your search. This is because the previously selected value param is still present in url / request to rest.

To Reproduce Steps to reproduce the behavior:

  1. Go to a metadata browse, eg https://demo.dspace.org/browse/subject
  2. Select a value & take note of another existing value
  3. Once on selected value page, eg "annuities" => https://demo.dspace.org/browse/subject?value=annuities, then search for the other existing browse value you took note of before, eg "behavior"
  4. Doesn't show result because the url still contains the previously selected value, https://demo.dspace.org/browse/subject?value=annuities&bbm.page=1&startsWith=behavior

Expected behavior If you're on a selected value page, and then search for a starts with browse, then the search should just reset. Or we should hide the search in the selected value page so that you have to go back to all browse values first.

MarieVerdonck avatar Jan 11 '24 19:01 MarieVerdonck