Skip to content

Commit

Permalink
Rename selectedFilters to filters in advanced search
Browse files Browse the repository at this point in the history
  • Loading branch information
dgcohen committed Oct 3, 2023
1 parent 0afc9dc commit 7f4b3ac
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pages/search/advanced.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export default function AdvancedSearch() {
name="language"
labelText="Language"
aria-labelledby="languageSelect-label"
value={searchFormState["selectedFilters"].language}
value={searchFormState["filters"].language}
onChange={(e) => handleInputChange(e, "filter_change")}
>
{languageOptions.map((language) => {
Expand All @@ -183,8 +183,8 @@ export default function AdvancedSearch() {
labelText="Dates"
nameFrom="dateAfter"
nameTo="dateBefore"
initialDate={searchFormState["selectedFilters"].dateAfter}
initialDateTo={searchFormState["selectedFilters"].dateBefore}
initialDate={searchFormState["filters"].dateAfter}
initialDateTo={searchFormState["filters"].dateBefore}
onChange={debounce(
(e) => handleDateChange(e),
debounceInterval
Expand All @@ -195,7 +195,7 @@ export default function AdvancedSearch() {
name="formats"
labelText="Formats"
onChange={handleCheckboxChange}
value={searchFormState["selectedFilters"].materialType}
value={searchFormState["filters"].materialType}
sx={{
"> div": {
display: "grid",
Expand Down
9 changes: 9 additions & 0 deletions src/config/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ export const SITE_NAME = "NYPL Research Catalog"
export const RESULTS_PER_PAGE = 50
export const DRB_RESULTS_PER_PAGE = 3

// Internal path names
export const PATHS = {
HOME: "/",
SEARCH: "/search",
ADVANCED_SEARCH: "/search/advanced",
"404": "/404",
"404_REDIRECT": "/404/redirect",
}

// API Names
export const DISCOVERY_API_NAME = "discovery"
export const DRB_API_NAME = "drb"
Expand Down
2 changes: 1 addition & 1 deletion src/utils/searchUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,4 @@ export function mapElementsToSearchResultsBibs(
.map((result) => {
return new SearchResultsBib(result.result)
})
}
}

0 comments on commit 7f4b3ac

Please sign in to comment.