angular icon indicating copy to clipboard operation
angular copied to clipboard

[BUG] Formio 8 with Angular 18 expects [language] input to be an EventEmitter not a string. It throws console error despite sending language as EventEmitter

Open celu opened this issue 11 months ago • 1 comments

Environment

Please provide as many details as you can:

  • Hosting type
    • [x] Local deployment
      • Version: 8.0.0
  • Formio.js version: 5.0.0
  • Frontend framework: Angular 18.2
  • Browser: chrome
  • Browser version: 132.0

Steps to Reproduce

  1. Trying to pass string 'es' to [language] input in formio angular selector throws type 'String' is not assignable to type EventEmitter
  2. Documentation describes language as a string input
  3. I created an EventEmitter which executes and sends 'es' string to [language] input, and language changes correctly.
  4. Also documentation says to set la language con options but FormioOptions interface doesn't allow language attribute in new version anymore.

Expected behavior

To allow developers to assign language in options or to create a new input to send current language as string

celu avatar Jan 21 '25 12:01 celu

Looks like you should be able to pass an event emitter or a string to the language option. Created a pr to fix this here https://github.com/formio/angular/pull/1136

"Also documentation says to set la language con options but FormioOptions interface doesn't allow language attribute in new version anymore." Were in the documentation do you see this? We'll try and get that updated as well For internal reference: FIO-10134

ZenMasterJacob20011 avatar May 07 '25 14:05 ZenMasterJacob20011

Looks like you should be able to pass an event emitter or a string to the language option. Created a pr to fix this here #1136

"Also documentation says to set la language con options but FormioOptions interface doesn't allow language attribute in new version anymore." Were in the documentation do you see this? We'll try and get that updated as well For internal reference: FIO-10134

Hello, documentation says to use it as a render option in https://github.com/formio/angular/wiki/Translations#project-context

We're still not being able to use it a string sending it as a input in angular component.

celu avatar Aug 08 '25 12:08 celu