Skip to content

Commit

Permalink
debouncing added for search field
Browse files Browse the repository at this point in the history
  • Loading branch information
i0am0arunava committed Nov 19, 2024
1 parent 7a4ecac commit b7e3e00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Patient/ManagePatients.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ export const PatientManager = () => {
return cleanedData;
};

const [debouncedParams] = useDebounce(params, 500); // Debounce time in milliseconds
const [debouncedParams] = useDebounce(params, 1000); // Debounce time in milliseconds

const { loading: isLoading, data } = useQuery(routes.patientList, {
query: debouncedParams, // Pass the debounced params
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export default function useFilters({

return (
<div
className={`col-span-3 my-2 flex w-full flex-wrap items-center gap-2 md:mt-10 ${show ? "" : "hidden"}`}
className={`col-span-3 my-2 flex w-full flex-wrap items-center gap-2 mt-6 ${show ? "" : "hidden"}`}
>
{compiledBadges.map((props) => (
<FilterBadge {...props} name={t(props.name)} key={props.name} />
Expand Down

0 comments on commit b7e3e00

Please sign in to comment.