File tree Expand file tree Collapse file tree
src/app/shared/form/builder
ds-dynamic-form-ui/models Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ export class DynamicConcatModel extends DynamicFormGroupModel {
4646 @serializable ( ) submissionId : string ;
4747 @serializable ( ) hasSelectableMetadata : boolean ;
4848 @serializable ( ) metadataValue : MetadataValue ;
49+ @serializable ( ) readOnly ?: boolean ;
4950
5051 isCustomGroup = true ;
5152 valueUpdates : Subject < string > ;
@@ -65,6 +66,7 @@ export class DynamicConcatModel extends DynamicFormGroupModel {
6566 this . valueUpdates = new Subject < string > ( ) ;
6667 this . valueUpdates . subscribe ( ( value : string ) => this . value = value ) ;
6768 this . typeBindRelations = config . typeBindRelations ? config . typeBindRelations : [ ] ;
69+ this . readOnly = config . disabled ;
6870 }
6971
7072 get value ( ) {
Original file line number Diff line number Diff line change @@ -19,8 +19,6 @@ import {
1919 SUBMISSION_ID
2020} from './field-parser' ;
2121import { DsDynamicInputModel , DsDynamicInputModelConfig } from '../ds-dynamic-form-ui/models/ds-dynamic-input.model' ;
22- import { VisibilityType } from '../../../../submission/sections/visibility-type' ;
23- import isEqual from 'lodash/isEqual' ;
2422
2523export class ConcatFieldParser extends FieldParser {
2624
@@ -85,9 +83,7 @@ export class ConcatFieldParser extends FieldParser {
8583 input1ModelConfig . required = true ;
8684 }
8785
88- if ( isNotEmpty ( this . configData . visibility ) && isEqual ( this . configData . visibility . main , VisibilityType . READONLY ) ) {
89- concatGroup . disabled = true ;
90- }
86+ concatGroup . disabled = input1ModelConfig . readOnly ;
9187
9288 if ( isNotEmpty ( this . firstPlaceholder ) ) {
9389 input1ModelConfig . placeholder = this . firstPlaceholder ;
You can’t perform that action at this time.
0 commit comments