Skip to content

Commit

Permalink
Update helpdesk route component to clear out the query results (both …
Browse files Browse the repository at this point in the history
…cached data and display of result in table) when the rebate year is changed
  • Loading branch information
courtneymyers committed Feb 27, 2024
1 parent 7bb524f commit 65e00fb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/client/src/routes/helpdesk.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,11 @@ export function Helpdesk() {
"tw-rounded-md tw-border-0 tw-text-sm tw-font-bold tw-leading-4 tw-ring-1 tw-ring-inset tw-ring-gray-300",
)}
name="rebate-year"
onChange={(ev) => setRebateYear(ev.target.value as RebateYear)}
onChange={(ev) => {
setRebateYear(ev.target.value as RebateYear);
setResultDisplayed(false);
queryClient.resetQueries({ queryKey: ["helpdesk"] });
}}
defaultValue={rebateYear}
>
<option>2022</option>
Expand Down

0 comments on commit 65e00fb

Please sign in to comment.