Skip to content

Commit

Permalink
Use null instead of undefined to clear selected value.
Browse files Browse the repository at this point in the history
  • Loading branch information
tirkarthi committed Dec 24, 2024
1 parent fea6fd2 commit 8807fc5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions airflow/ui/src/components/SearchDags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@
import { Field } from "@chakra-ui/react";
import { useQueryClient } from "@tanstack/react-query";
import { AsyncSelect } from "chakra-react-select";
import type { OptionsOrGroups, GroupBase } from "chakra-react-select";
import type { OnChangeValue } from "chakra-react-select";
import type {
OptionsOrGroups,
GroupBase,
OnChangeValue,
} from "chakra-react-select";
import debounce from "debounce-promise";
import { useNavigate } from "react-router-dom";

Expand Down Expand Up @@ -90,7 +93,7 @@ export const SearchDags = () => {
loadOptions={searchDagDebounced}
onChange={onSelect}
placeholder="Search Dags"
value={undefined}
value={null} // null is required https://github.com/JedWatson/react-select/issues/3066
/>
</Field.Root>
);
Expand Down

0 comments on commit 8807fc5

Please sign in to comment.