Skip to content

Commit

Permalink
updated state passing
Browse files Browse the repository at this point in the history
Signed-off-by: Amardeepsingh Siglani <[email protected]>
  • Loading branch information
amsiglan committed Sep 9, 2024
1 parent de2c76a commit 685f419
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions public/pages/Main/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,13 @@ export default class Main extends Component<MainProps, MainState> {
if (pathnameChanged || this.state.selectedDataSource.id !== prevState.selectedDataSource.id) {
const searchParams = new URLSearchParams(this.props.location.search);
searchParams.set('dataSourceId', this.state.selectedDataSource.id);
this.props.history.replace({
...this.props.location,
search: searchParams.toString(),
});
this.props.history.replace(
{
...this.props.location,
search: searchParams.toString(),
},
this.props.location.state
);
}

if (pathnameChanged) {
Expand Down

0 comments on commit 685f419

Please sign in to comment.