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

Input label ignored inside TranslatableInputs #6414

Closed
mjomble opened this issue Jul 5, 2021 · 2 comments · Fixed by #6415
Closed

Input label ignored inside TranslatableInputs #6414

mjomble opened this issue Jul 5, 2021 · 2 comments · Fixed by #6415

Comments

@mjomble
Copy link
Contributor

mjomble commented Jul 5, 2021

What you were expecting:
Custom label text (via the label prop) should appear on an input inside TranslatableInputs

What happened instead:
The default label text (derived from the name of the field) appeared instead, with seemingly no way to override it.

Steps to reproduce:
Open the edit view of any tag (or navigate to /#/tags/1).
Look at the label on the name field.

Related code:
https://codesandbox.io/s/eloquent-fermi-jjxte?file=/src/tags/TagEdit.tsx

Other information:
This line overwrites child.props.label

Environment

  • React-admin version: 3.16.4
  • Last version that did not exhibit the issue (if applicable):
  • React version: 17.0.2
  • Browser: Chrome 91
  • Stack trace (in case of a JS error):
@djhi
Copy link
Collaborator

djhi commented Jul 6, 2021

Good catch! Thanks for reporting it. Can you make a PR to fix it too?

@mjomble
Copy link
Contributor Author

mjomble commented Jul 6, 2021

I can try making a PR.

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

Successfully merging a pull request may close this issue.

2 participants