-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
fix(ra-ui-materialui): Fix <TabbedFormView/> to support string ids with spaces #10324
base: master
Are you sure you want to change the base?
fix(ra-ui-materialui): Fix <TabbedFormView/> to support string ids with spaces #10324
Conversation
Hi and thanks for the PR! Would you mind adding a story and a test? Besides, don't we have the same issue with |
Hello! No, we don't have the same issue with the |
@djhi i just added a story & unit test |
I tried your PR locally and it seems it already work in v5 without the fix. Your issue mention react-admin v4 though. Can you confirm? |
@djhi I’m not sure, but I just used the example app and changed the ID from Here’s the link to the relevant code: data.tsx#L4. |
I can confirm the bug exists in v5 |
Bug Fix: TabbedForm Support for IDs with Spaces
Problem:
TabbedForm
fails to render tabs when the entity ID contains spaces.This occurs because
TabbedFormView
compares the raw location.pathname (which containsencoded spaces as %20) with tab paths, causing the path matching to fail.
Solution:
Fixed
getDecodedPathname
utility function that:This ensures consistent path matching regardless of spaces in entity IDs, allowing
TabbedForm to properly render and navigate between tabs.
Fixes #9545