question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ReferenceInput label uses the wrong resource for translation message

See original GitHub issue

ReferenceInput in react-admin@4.02 traduct field in the same way of react-admin@3.19

When editing a resource posts with the following field <ReferenceInput source="idUser" reference="users"><AutoComplete /></ReferenceInput> The ReferenceInput label will be traduct with the key resources.users.fields.idUser in react-admin@4, while react-admin@3.19 use resources.posts.fields.idUser

The ReferenceField use resources.posts.fields.idUser in react-admin@3.19 and react-admin@4.02

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
fzaninottocommented, May 5, 2022

I may have a good solution. The idea is to invert the control of FieldTitle. Instead of pushing props to it, let it pull data from a context…

So SimpleForm, ArrayInput, ReferenceInput, and many other components, should create a <FieldTitlePrefixContext>. They have the means to build a value for it.

Individual inputs would just pass the props they receive to FieldTitle: label, and source. <FieldTitle> would use the FieldTitlePrefixContext value to prefix the source it receives in case it has no label.

This is a pretty large change, but I think it’s the right way - it’s, in fact, the continuation of what we’ve done in the 3.0 -> 4.0 migration.

And it’s backwards compatible.

0reactions
fzaninottocommented, May 19, 2022

Fixed by #7110

Read more comments on GitHub >

github_iconTop Results From Across the Web

React-admin: <ReferenceInput> doesn't work with custom ...
it seems that now message doesn't appear in console, but there is still a pop-up with the error and referenceInput still doesn't load...
Read more >
General Error Messages | InterSystems Error Reference
This document contains tables of numeric error codes and their corresponding error messages for InterSystems IRIS® data platform. Commonly, these error ...
Read more >
https://raw.githubusercontent.com/marmelab/admin-o...
... tutorial usage of ReferenceInput for Create ([djhi](https://github.com/djhi)) ... redux-form 6.6.3, material-ui 0.17.4) * Fix error messages translation ...
Read more >
All other San Diego fixes - Product Documentation | ServiceNow
Application Usage Overview dashboard release notes ... appearance of the following error message in the logs: 'Invalid message subscription: ...
Read more >
Winter '22 - Trailblazer Community - Salesforce
And, if the updated translation text(including HTML TAGS) are less than 1000 characters are ... Error message: The pull upgrade of your package...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found