Skip to content

Commit

Permalink
fix: 🐛 initialize sorting method state after closing cluster drawer
Browse files Browse the repository at this point in the history
  • Loading branch information
hsinlun99 committed Jun 20, 2024
1 parent f727bb3 commit a4f0eff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/Drawer/ClusterDrawer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ const ClusterDrawer: React.FC = () => {
React.useEffect(() => {
if (!isCurrentDrawerParams("cluster", searchParams)) {
dispatch(resetReport());
setSortingMethod(sortingOptions[0].key);
setSortingMessage(sortingMessages[0].message);
}
}, [dispatch, searchParams]);

Expand Down

0 comments on commit a4f0eff

Please sign in to comment.