Skip to content

Commit

Permalink
Merge pull request #782 from culturecreates/bugfix/issue-752
Browse files Browse the repository at this point in the history
fix: filters not clearing issue while switching calendars
  • Loading branch information
AbhishekPAnil authored Nov 15, 2023
2 parents ddef590 + ffb55e8 commit 5f0635c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/Sidebar/Main/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ function Sidebar(props) {
interfaceLanguage: user?.interfaceLanguage?.toLowerCase(),
calendarContentLanguage: calendarContentLanguage,
});
sessionStorage.clear();
setCalendarItem(selectedCalendar(currentCalendarData?.id, currentCalendarData?.image?.uri, calendarLabel));
}, [currentCalendarData]);

Expand Down
4 changes: 4 additions & 0 deletions src/pages/Dashboard/Events/Events.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ function Events() {

const calendarContentLanguage = currentCalendarData?.contentLanguage;

useEffect(() => {
filterClearHandler(); // when calendar data changes filters are reset
}, [currentCalendarData]);

useEffect(() => {
let query = new URLSearchParams();
let sortQuery = new URLSearchParams();
Expand Down

0 comments on commit 5f0635c

Please sign in to comment.