You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm creating a form and I have a custom field component which shows descriptions, titles and more. I pass an object of translations to that component containing the translations: <Field lang={$LL.form.fields.duration_type} ... />. From within the component I access the strings with {lang?.label?.()}. This work perfectly fine when running the development server
Now the problem:
When I build the project (with node adapter) and open the page the translations are gone. On further inspection one can see (when refreshing the page) that the right translation is visible for a short period of time and then vanishes. This means that the server rendered page contained the translations but the client render pass removed them.
But using translations in any other way works completely fine: {$LL.form.fields.duration_type.label()}
So the problem is that the lang object becomes empty on the client, since when I log the object, or display it, it is empty.
Version
5.26.2
Describe the bug
I'm creating a form and I have a custom field component which shows descriptions, titles and more. I pass an object of translations to that component containing the translations:
<Field lang={$LL.form.fields.duration_type} ... />
. From within the component I access the strings with{lang?.label?.()}
. This work perfectly fine when running the development serverNow the problem:
When I build the project (with node adapter) and open the page the translations are gone. On further inspection one can see (when refreshing the page) that the right translation is visible for a short period of time and then vanishes. This means that the server rendered page contained the translations but the client render pass removed them.
But using translations in any other way works completely fine:
{$LL.form.fields.duration_type.label()}
So the problem is that the
lang
object becomes empty on the client, since when I log the object, or display it, it is empty.Reproduction
Additional information
No response
The text was updated successfully, but these errors were encountered: