Skip to content

Commit 1376f3b

Browse files
committed
propagate readOnly prop in Angular detail-List
closes #1479
1 parent f6a6e1b commit 1376f3b

File tree

1 file changed

+5
-0
lines changed
  • packages/angular-material/src/other/master-detail

1 file changed

+5
-0
lines changed

packages/angular-material/src/other/master-detail/master.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import {
4141
mapStateToArrayControlProps,
4242
RankedTester,
4343
rankWith,
44+
setReadonly,
4445
StatePropsOfArrayControl,
4546
uiTypeIs
4647
} from '@jsonforms/core';
@@ -183,6 +184,10 @@ export class MasterListComponent extends JsonFormsArrayControl {
183184
props.rootSchema
184185
);
185186

187+
if (!this.isEnabled()) {
188+
setReadonly(detailUISchema);
189+
}
190+
186191
const masterItems = (data || []).map((d: any, index: number) => {
187192
const labelRefInstancePath = controlElement.options?.labelRef && removeSchemaKeywords(
188193
controlElement.options.labelRef

0 commit comments

Comments
 (0)