angular icon indicating copy to clipboard operation
angular copied to clipboard

[BUG] Options support in @formio/angular

Open otebos opened this issue 3 years ago • 0 comments

Environment

This issue regards the formBuilder in @formio/angular 5.2.2 and is not observed in angular-formio 4.11.5 When I pass options in angular-formio version, it works. When I pass options in @formio/angular version, typescript screams about FormioOptions properties. When I changed FormBuilderComponent.options from options?: FormioOptions; to options?: any; There is no error but still nothing happens.

Looking at FormioOptions definition TypeScript is correct as there are no properties that are defined in documentation and samples like editForm, builder, buttonSettings etc ...

How should I pass options to form builder? Or @formio/angular is not for use and I should use angular-formio version?

  • Hosting type
    • [x ] Local deployment
      • Version:
  • Formio.js version: 4.14.7
  • Frontend framework: Angular 13
  • Browser: n/a
  • Browser version: n/a

Steps to Reproduce

  1. define options like formioOptions = {editForm: { textfield: [{ key: 'api', ignore: true }] }}
  2. pass to <form-builder [form]="form" [options]="formioOptions"></form-builder>

Expected behavior

Options are applied

Observed behavior

TypeScript error error TS2559: Type '{ editForm: { textfield: { key: string; ignore: boolean; }[]; }; }' has no properties in common with type 'FormioOptions'.

otebos avatar May 24 '22 10:05 otebos