angular-material
angular-material copied to clipboard
[BUG] Cannot set submission in Angular 11
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)
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