Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

[BUG] Cannot set submission in Angular 11 #192

Open
bahuma20 opened this issue Jul 26, 2021 · 1 comment
Open

[BUG] Cannot set submission in Angular 11 #192

bahuma20 opened this issue Jul 26, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@bahuma20
Copy link

Environment

Please provide as many details as you can:

    "@angular/core": "^11.2.14",
    "@angular/material": "^11.2.13",
    "@angular/cdk": "^11.2.13",
    "angular-material-formio": "^2.0.0-rc.1",
    "formiojs": "^4.13.4",

Steps to Reproduce

  <mat-formio [form]="form" [submission]='{
    "data": {
      "created": "2021-07-26T14:25:56+0200",
      "leistungsdatum": "2021-07-26T12:25:43.000Z",
      "auftraggeber": "test",
      "arbeitsstaette": "test",
      "bericht": "test",
      "arbeitszeit": [
        {
        "arbeitszeitFacharbeiter": "test",
        "arbeitszeitStunden": 5
        }
      ],
      "signed": false,
      "submit": true,
      "nummer": 123
    }
  }' (submit)="onSubmit($event)"></mat-formio>

Expected behavior

It should display a form with pre filled values from the submission. (This worked in Angular 8)

Observed behavior

It displays a form with emty fields. No error message in console. (Since the upgrade to Angular 11, didn't work in Angular 10 either)

@bahuma20 bahuma20 added the bug Something isn't working label Jul 26, 2021
@DamianSoltys
Copy link

DamianSoltys commented Jun 23, 2022

Hey @bahuma20 did you managed to fix that?

I found out that in Webform.ts file there is line of code: this.setValue(this._submission), removing it fixes the problem with data population by this attribute. Is it needed to be there?, maybe we can just remove that line?. @travist

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants