Skip to content

Commit

Permalink
fix (Advanced Filters): all filter sidebars collapse on clearing filters
Browse files Browse the repository at this point in the history
  • Loading branch information
naman114 committed Dec 21, 2022
1 parent 0fd7948 commit ae8432a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Components/Patient/PatientFilterV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ export default function PatientFilterV2(props: any) {
onClear={() => {
navigate("/patients");
setFilterState(clearFilterState);
closeFilter();
}}
/>
<div className="w-full flex-none pt-20">
Expand Down
1 change: 1 addition & 0 deletions src/Components/Patient/SampleFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export default function UserFilter(props: any) {
onClick={(_) => {
navigate("/sample");
setFilterState(clearFilterState);
closeFilter();
}}
>
<i className="fas fa-times mr-2" />
Expand Down
6 changes: 5 additions & 1 deletion src/Components/Resource/ListFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@ export default function ListFilter(props: any) {
<i className="fas fa-times mr-2" />
Cancel
</button>
<Link href="/resource" className="btn btn-default hover:text-gray-900">
<Link
href="/resource"
className="btn btn-default hover:text-gray-900"
onClick={closeFilter}
>
<i className="fas fa-times mr-2" />
Clear Filters
</Link>
Expand Down
1 change: 1 addition & 0 deletions src/Components/Users/UserFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export default function UserFilter(props: any) {
onClear={() => {
navigate("/users");
setFilterState(clearFilterState);
closeFilter();
}}
/>

Expand Down

0 comments on commit ae8432a

Please sign in to comment.