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

String Ids with spaces are not supported by TabbedForm #9545

Open
mikhail-fedosenko opened this issue Dec 26, 2023 · 1 comment · May be fixed by #10324
Open

String Ids with spaces are not supported by TabbedForm #9545

mikhail-fedosenko opened this issue Dec 26, 2023 · 1 comment · May be fixed by #10324

Comments

@mikhail-fedosenko
Copy link

mikhail-fedosenko commented Dec 26, 2023

What you were expecting:
I have an entity with string Id that has a space in it. When I navigate to Edit view with TabbedForm I expect to see working tabbed form and first tab is opened by default.

What happened instead:
No tabs are rendered.

Steps to reproduce:

Related code:
I digged into the RA source code and found out, that TabbedFormView uses raw location.pathname to match with tab path. Obviously, spaces in URL are converted to %20 strings.

const hidden = syncWithLocation
    ? !matchPath(
          `${resolvedPath.pathname}/${tabPath}`,
          location.pathname
      )
    : tabValue !== index;
Screenshot 2023-12-26 at 12 27 31

Environment

  • React-admin version: 4.14.3
  • React version: 18.2.0
@fzaninotto fzaninotto added the bug label Jan 3, 2024
@fzaninotto
Copy link
Member

Confirmed, thanks for the report. As this isn't a common use case, we won't work on fixing it ourselves, but we'll welcome any PR that fixes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants