-
Notifications
You must be signed in to change notification settings - Fork 30.2k
Closed
Description
Bug report
When I try to push a new route with the option { shallow: true } it trigger getInitialProps ignoring the option.
The route is a dynamic route (with custom server) it's something like /handling-request/:id/:tab
I need the param tab to get direct to the selected tab, but I also need to update the url when the tab change.
If you have any suggestion/workaround I'm open to new solutions.
That's the code:
handleTabChange = (e, value) => {
this.setState({ tabIndex: value });
const { id } = this.props.router.query;
Router.replace(`/handling-request?id=${id}&tab=${value}`, `/handling-request/${id}/${value}`, {
shallow: true,
});
};(I'm using material-ui-react tabs)
System information
- OS:
macOS 10.14 - Browser:
Chrome - Version of Next.js:
7.0.2
andrerpena and textpain
Metadata
Metadata
Assignees
Labels
No labels