File tree Expand file tree Collapse file tree 2 files changed +31
-13
lines changed
src/app/shared/form/builder Expand file tree Collapse file tree 2 files changed +31
-13
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ import {
1313 DynamicFormControlModel ,
1414 DynamicFormControlRelation ,
1515 DynamicFormRelationService ,
16+ MATCH_DISABLED ,
17+ MATCH_ENABLED ,
1618 MATCH_VISIBLE ,
1719 OR_OPERATOR ,
1820} from '@ng-dynamic-forms/core' ;
@@ -217,9 +219,9 @@ export class DsDynamicTypeBindRelationService {
217219 }
218220
219221 /**
220- * Helper function to construct a typeBindRelations array
221- * @param configuredTypeBindValues
222- */
222+ * Helper function to construct a typeBindRelations array
223+ * @param configuredTypeBindValues
224+ */
223225 public getTypeBindRelations ( configuredTypeBindValues : string [ ] ) : DynamicFormControlRelation [ ] {
224226 const bindValues = [ ] ;
225227 configuredTypeBindValues . forEach ( ( value ) => {
@@ -228,11 +230,18 @@ export class DsDynamicTypeBindRelationService {
228230 value : value ,
229231 } ) ;
230232 } ) ;
231- return [ {
232- match : MATCH_VISIBLE ,
233- operator : OR_OPERATOR ,
234- when : bindValues ,
235- } ] ;
233+ return [
234+ {
235+ match : MATCH_ENABLED ,
236+ operator : OR_OPERATOR ,
237+ when : bindValues ,
238+ } ,
239+ {
240+ match : MATCH_VISIBLE ,
241+ operator : OR_OPERATOR ,
242+ when : bindValues ,
243+ } ,
244+ ] ;
236245 }
237246
238247}
Original file line number Diff line number Diff line change 55import {
66 DynamicFormControlLayout ,
77 DynamicFormControlRelation ,
8+ MATCH_DISABLED ,
9+ MATCH_ENABLED ,
810 MATCH_VISIBLE ,
911 OR_OPERATOR ,
1012} from '@ng-dynamic-forms/core' ;
@@ -381,11 +383,18 @@ export abstract class FieldParser {
381383 // Example: Field [x] will be VISIBLE if item type = book OR item type = book_part
382384 //
383385 // The opposing match value will be the dc.type for the workspace item
384- return [ {
385- match : MATCH_VISIBLE ,
386- operator : OR_OPERATOR ,
387- when : bindValues ,
388- } ] ;
386+ return [
387+ {
388+ match : MATCH_ENABLED ,
389+ operator : OR_OPERATOR ,
390+ when : bindValues ,
391+ } ,
392+ {
393+ match : MATCH_VISIBLE ,
394+ operator : OR_OPERATOR ,
395+ when : bindValues ,
396+ } ,
397+ ] ;
389398 }
390399
391400 protected hasRegex ( ) {
You can’t perform that action at this time.
0 commit comments