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

Incorrect i18n type in options #601

Closed
Oaciqihz opened this issue Feb 19, 2025 · 1 comment
Closed

Incorrect i18n type in options #601

Oaciqihz opened this issue Feb 19, 2025 · 1 comment
Assignees

Comments

@Oaciqihz
Copy link

Describe the bug
When using the Form component in the latest @formio/react version, I encountered a type error with the i18n options. This might be due to an incorrect type definition.
The i18n type defined in @formio/js/lib/cjs/Form.d.ts as i18n?: { [key: string]: string; } | undefined; is incompatible with the runtime type, which should be i18n?: { [key: string]: Record<string, string>; } | undefined;.
To Reproduce

import { Form } from '@formio/react'
<Form  
   options={{
      i18n: {
         sp: {
           'First Name': 'Nombre de pila',
         }
      }
   }}  
/>

Screenshots
Image

@ZenMasterJacob20011
Copy link

Made a PR to update this. Thank you for contribution
formio/formio.js#6032

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

No branches or pull requests

3 participants