Skip to content

Commit 5ccbe8a

Browse files
authored
Fixing search filter (#187)
* Fixing search filter back for progress grant data * Importing css sheet for search bar
1 parent d372794 commit 5ccbe8a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

frontend/src/main-page/grants/filter-bar/GrantSearch.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { updateSearchQuery } from "../../../external/bcanSatchel/actions";
77
import { Grant } from "../../../../../middle-layer/types/Grant";
88
// import { api } from "../../../api";
99
import { Input } from "@chakra-ui/react";
10+
import "../styles/GrantSearch.css"
1011

1112

1213
function GrantSearch() {

frontend/src/main-page/grants/filter-bar/processGrantData.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
filterGrants,
88
yearFilterer,
99
statusFilter,
10+
searchFilter
1011
} from "./grantFilters";
1112
import { sortGrants } from "./grantSorter.ts";
1213
import { api } from "../../../api.ts";
@@ -28,7 +29,7 @@ const fetchGrants = async () => {
2829
// contains callbacks for sorting and filtering grants
2930
// stores state for list of grants/filter
3031
export const ProcessGrantData = () => {
31-
const { allGrants, filterStatus, startDateFilter, endDateFilter, yearFilter } = getAppStore();
32+
const { allGrants, filterStatus, startDateFilter, endDateFilter, yearFilter, searchQuery } = getAppStore();
3233

3334
// fetch grants on mount if empty
3435
useEffect(() => {
@@ -40,6 +41,7 @@ export const ProcessGrantData = () => {
4041
statusFilter(filterStatus),
4142
dateRangeFilter(startDateFilter, endDateFilter),
4243
yearFilterer(yearFilter),
44+
searchFilter(searchQuery)
4345
]);
4446

4547
// sorting callback

0 commit comments

Comments
 (0)