Skip to content

Commit 419ed28

Browse files
committed
#RI-6081 - fix reset context when switch database happens on the same page
1 parent 8401d97 commit 419ed28

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

redisinsight/ui/src/pages/instance/InstancePage.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ const InstancePage = ({ routes = [] }: Props) => {
7070
}, [pathname])
7171

7272
useEffect(() => {
73-
if (isShouldChildrenRerender) setIsShouldChildrenRerender(false)
73+
if (isShouldChildrenRerender) {
74+
dispatch(resetDatabaseContext())
75+
setIsShouldChildrenRerender(false)
76+
}
7477
}, [isShouldChildrenRerender])
7578

7679
if (isShouldChildrenRerender) {

0 commit comments

Comments
 (0)