[MNT-24715] App with APS does not show display value of dynamic table (#10799)

* [MNT-24715] App with APS does not show display value of dynamic table

* [MNT-24715] fix linting
This commit is contained in:
Mykyta Maliarchuk
2025-04-18 10:38:46 +02:00
committed by GitHub
parent 1f73f7fe40
commit 0dc45e95af
5 changed files with 88 additions and 0 deletions

View File

@@ -110,6 +110,12 @@ describe('DynamicTableWidgetComponent', () => {
expect(row.selected).toBeFalsy();
});
it('should set readOnly to true when field type is readonly', () => {
widget.field.type = 'readonly';
widget.ngOnInit();
expect(widget.readOnly).toBeTrue();
});
it('should reset selected row', () => {
const row = { selected: false } as DynamicTableRow;
widget.content.rows.push(row);

View File

@@ -69,6 +69,9 @@ export class DynamicTableWidgetComponent extends WidgetComponent implements OnIn
if (this.field) {
this.content = new DynamicTableModel(this.field, this.formService);
this.visibilityService.refreshVisibility(this.field.form);
if (this.field.type === 'readonly') {
this.readOnly = true;
}
}
}