From d12cd77b7775f7d6ad12aebc152f44d3dfced5df Mon Sep 17 00:00:00 2001 From: SrGooglo Date: Wed, 20 Sep 2023 10:25:31 +0000 Subject: [PATCH] fix `replaceQueryTypeToCurrentTab` --- packages/app/src/components/PagePanels/index.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/app/src/components/PagePanels/index.jsx b/packages/app/src/components/PagePanels/index.jsx index 2bb56b7d..48f5be10 100755 --- a/packages/app/src/components/PagePanels/index.jsx +++ b/packages/app/src/components/PagePanels/index.jsx @@ -128,8 +128,8 @@ export class PagePanelWithNavMenu extends React.Component { }) } - replaceQueryTypeToCurrentTab = () => { - app.history.replace(`${window.location.pathname}?type=${this.state.activeTab}`) + replaceQueryTypeToCurrentTab = (key) => { + app.history.replace(`${window.location.pathname}?type=${key ?? this.state.activeTab}`) } tabChange = async (key) => { @@ -140,7 +140,7 @@ export class PagePanelWithNavMenu extends React.Component { await this.setState({ activeTab: key }) if (this.props.useSetQueryType) { - this.replaceQueryTypeToCurrentTab() + this.replaceQueryTypeToCurrentTab(key) } if (this.props.onTabChange) {