DEV-900: add 'original location' filter to advanced search #106
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
related to hathitrust/babel#70 and hathitrust/catalog#65
This adds an "Original Location" filter option to the advanced search component.
See this in action on dev-3 catalog and ls (vpn required).
FilterableSelection
componentI added another
FilterableSelection
component to match the 'Language' and 'Format' selection options. This version, however, sets the 'multiple' prop tofalse
because selecting two locations did not work in eithercatalog
orls
.search parameters
I updated the functions for
catalog
andls
search URLs. The form itself is identical, but the URLs for searching incatalog
andls
have slight differences. I added functions for appending anhtsource
facet/filter to the search parameters. There is also some logic in theonMount()
hook that checks if there are existing search parameters when the page is loaded (in case the user clicked 'Revise this advanced search' from the search results page) so that those options are pre-filled/pre-selected in the form. I added some conditionals for original location for bothcatalog
andls
that updates the component with that value from the URL.testing
Things you could test:
*
as search term with location selected (to see all items from that location)