From ae8432a50f788e5fd1911a991f2e28c01225d9d8 Mon Sep 17 00:00:00 2001 From: naman114 Date: Thu, 22 Dec 2022 01:03:04 +0530 Subject: [PATCH] fix (Advanced Filters): all filter sidebars collapse on clearing filters --- src/Components/Patient/PatientFilterV2.tsx | 1 + src/Components/Patient/SampleFilters.tsx | 1 + src/Components/Resource/ListFilter.tsx | 6 +++++- src/Components/Users/UserFilter.tsx | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Components/Patient/PatientFilterV2.tsx b/src/Components/Patient/PatientFilterV2.tsx index 9970caf1ffd..65917d12e81 100644 --- a/src/Components/Patient/PatientFilterV2.tsx +++ b/src/Components/Patient/PatientFilterV2.tsx @@ -361,6 +361,7 @@ export default function PatientFilterV2(props: any) { onClear={() => { navigate("/patients"); setFilterState(clearFilterState); + closeFilter(); }} />
diff --git a/src/Components/Patient/SampleFilters.tsx b/src/Components/Patient/SampleFilters.tsx index 86f81564f18..88a630b3535 100644 --- a/src/Components/Patient/SampleFilters.tsx +++ b/src/Components/Patient/SampleFilters.tsx @@ -81,6 +81,7 @@ export default function UserFilter(props: any) { onClick={(_) => { navigate("/sample"); setFilterState(clearFilterState); + closeFilter(); }} > diff --git a/src/Components/Resource/ListFilter.tsx b/src/Components/Resource/ListFilter.tsx index fa1372e9147..42871ab76a2 100644 --- a/src/Components/Resource/ListFilter.tsx +++ b/src/Components/Resource/ListFilter.tsx @@ -154,7 +154,11 @@ export default function ListFilter(props: any) { Cancel - + Clear Filters diff --git a/src/Components/Users/UserFilter.tsx b/src/Components/Users/UserFilter.tsx index a77ac1793d9..5cdec9728d4 100644 --- a/src/Components/Users/UserFilter.tsx +++ b/src/Components/Users/UserFilter.tsx @@ -91,6 +91,7 @@ export default function UserFilter(props: any) { onClear={() => { navigate("/users"); setFilterState(clearFilterState); + closeFilter(); }} />