Skip to content

Commit

Permalink
propagate readOnly prop in Angular detail-List
Browse files Browse the repository at this point in the history
closes #1479
  • Loading branch information
LukasBoll committed Dec 6, 2022
1 parent f6a6e1b commit 1376f3b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/angular-material/src/other/master-detail/master.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import {
mapStateToArrayControlProps,
RankedTester,
rankWith,
setReadonly,
StatePropsOfArrayControl,
uiTypeIs
} from '@jsonforms/core';
Expand Down Expand Up @@ -183,6 +184,10 @@ export class MasterListComponent extends JsonFormsArrayControl {
props.rootSchema
);

if (!this.isEnabled()) {
setReadonly(detailUISchema);
}

const masterItems = (data || []).map((d: any, index: number) => {
const labelRefInstancePath = controlElement.options?.labelRef && removeSchemaKeywords(
controlElement.options.labelRef
Expand Down

0 comments on commit 1376f3b

Please sign in to comment.