fix replaceQueryTypeToCurrentTab

This commit is contained in:
SrGooglo 2023-09-20 10:25:31 +00:00
parent 5c6c91d844
commit d12cd77b77

View File

@ -128,8 +128,8 @@ export class PagePanelWithNavMenu extends React.Component {
}) })
} }
replaceQueryTypeToCurrentTab = () => { replaceQueryTypeToCurrentTab = (key) => {
app.history.replace(`${window.location.pathname}?type=${this.state.activeTab}`) app.history.replace(`${window.location.pathname}?type=${key ?? this.state.activeTab}`)
} }
tabChange = async (key) => { tabChange = async (key) => {
@ -140,7 +140,7 @@ export class PagePanelWithNavMenu extends React.Component {
await this.setState({ activeTab: key }) await this.setState({ activeTab: key })
if (this.props.useSetQueryType) { if (this.props.useSetQueryType) {
this.replaceQueryTypeToCurrentTab() this.replaceQueryTypeToCurrentTab(key)
} }
if (this.props.onTabChange) { if (this.props.onTabChange) {