Skip to content

Commit

Permalink
fix(scrolling): implemented scrolling for country dropdown search
Browse files Browse the repository at this point in the history
  • Loading branch information
MethodManav committed Feb 26, 2025
1 parent 3751ff8 commit 83ce2ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/ui/phone-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const CountrySelect = ({
}: CountrySelectProps) => {
const { t } = useTranslation();
const [filteredCountries, setFilteredCountries] = React.useState(countryList);
const handleSearch = (query: string) => {
const handleScroll = (query: string) => {
const filtered = countryList.filter(({ label }) =>
label.toLowerCase().includes(query.toLowerCase()),
);
Expand Down Expand Up @@ -132,7 +132,7 @@ const CountrySelect = ({
<CommandInput
placeholder={t("search_country")}
className="outline-none border-none ring-0 shadow-none"
onValueChange={handleSearch}
onValueChange={handleScroll}
/>
<CommandList>
<ScrollArea className="h-72">
Expand Down

0 comments on commit 83ce2ac

Please sign in to comment.