Skip to content
Merged
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
1 change: 1 addition & 0 deletions frontend/src/main-page/grants/filter-bar/GrantSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { updateSearchQuery } from "../../../external/bcanSatchel/actions";
import { Grant } from "../../../../../middle-layer/types/Grant";
// import { api } from "../../../api";
import { Input } from "@chakra-ui/react";
import "../styles/GrantSearch.css"


function GrantSearch() {
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/main-page/grants/filter-bar/processGrantData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
filterGrants,
yearFilterer,
statusFilter,
searchFilter
} from "./grantFilters";
import { sortGrants } from "./grantSorter.ts";
import { api } from "../../../api.ts";
Expand All @@ -28,7 +29,7 @@ const fetchGrants = async () => {
// contains callbacks for sorting and filtering grants
// stores state for list of grants/filter
export const ProcessGrantData = () => {
const { allGrants, filterStatus, startDateFilter, endDateFilter, yearFilter } = getAppStore();
const { allGrants, filterStatus, startDateFilter, endDateFilter, yearFilter, searchQuery } = getAppStore();

// fetch grants on mount if empty
useEffect(() => {
Expand All @@ -40,6 +41,7 @@ export const ProcessGrantData = () => {
statusFilter(filterStatus),
dateRangeFilter(startDateFilter, endDateFilter),
yearFilterer(yearFilter),
searchFilter(searchQuery)
]);

// sorting callback
Expand Down