mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[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:
committed by
GitHub
parent
1f73f7fe40
commit
0dc45e95af
@@ -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);
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user