Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

[Issue #75] Added sticky behavior to search filter sidebar #76

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 22 additions & 20 deletions frontend/src/app/[locale]/search/SearchForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,26 +60,28 @@ export function SearchForm({
</div>
<div className="grid-row grid-gap">
<div className="tablet:grid-col-4">
<SearchOpportunityStatus
formRef={formRef}
initialQueryParams={statusQueryParams}
/>
<SearchFilterFundingInstrument
formRef={formRef}
initialQueryParams={fundingInstrumentQueryParams}
/>
<SearchFilterEligibility
formRef={formRef}
initialQueryParams={eligibilityQueryParams}
/>
<SearchFilterAgency
formRef={formRef}
initialQueryParams={agencyQueryParams}
/>
<SearchFilterCategory
formRef={formRef}
initialQueryParams={categoryQueryParams}
/>
<div className="search-filter">
<SearchOpportunityStatus
formRef={formRef}
initialQueryParams={statusQueryParams}
/>
<SearchFilterFundingInstrument
formRef={formRef}
initialQueryParams={fundingInstrumentQueryParams}
/>
<SearchFilterEligibility
formRef={formRef}
initialQueryParams={eligibilityQueryParams}
/>
<SearchFilterAgency
formRef={formRef}
initialQueryParams={agencyQueryParams}
/>
<SearchFilterCategory
formRef={formRef}
initialQueryParams={categoryQueryParams}
/>
</div>
</div>
<div className="tablet:grid-col-8">
<SearchResultsHeader
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/styles/_uswds-theme-custom-styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,10 @@ i.e.
@include u-shadow(4);
}
}

.search-filter {
position: sticky;
top: 0;
overflow: auto;
max-height: 100vh;
}
Loading