Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DNM] Fix tab navigation with react-router >= 6.19 #9476

Closed
wants to merge 3 commits into from

Conversation

slax57
Copy link
Contributor

@slax57 slax57 commented Nov 28, 2023

Fix #9468

@@ -36,7 +36,7 @@ export const TabbedFormView = (props: TabbedFormViewProps): ReactElement => {
...rest
} = props;
const location = useLocation();
const resolvedPath = useResolvedPath('');
const resolvedPath = useResolvedPath('.');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately this part doesn't work:

  • React-router 6.18 requires useResolvedPath('.')
  • While React-router 6.20 requires useResolvedPath('..')

I can't find a way to make both versions happy with the same code...

I'm open to any suggestions if any, or, you may want to upvote remix-run/react-router#11048 (comment) and remix-run/react-router#11052 (comment) to request for a fix from react-router.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest we change the package.json to forbid recent react-router versions.

@slax57 slax57 added the DNM Do Not Merge label Nov 28, 2023
@slax57 slax57 changed the title [WIP] Fix tab navigation with react-router >= 6.19 [DNM] Fix tab navigation with react-router >= 6.19 Nov 28, 2023
@fzaninotto
Copy link
Member

Superseded by #9480

@fzaninotto fzaninotto closed this Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DNM Do Not Merge WIP Work In Progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TabbedForm and TabbedShowLayout tab navigation is broken
2 participants