File tree Expand file tree Collapse file tree
src/app/shared/form/builder/parsers Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { Inject } from '@angular/core' ;
1+ import { Inject } from '@angular/core' ;
22import { FormFieldModel } from '../models/form-field.model' ;
33import {
44 CONFIG_DATA ,
@@ -40,11 +40,8 @@ export class DropdownFieldParser extends FieldParser {
4040 this . setVocabularyOptions ( dropdownModelConfig , this . parserOptions . collectionUUID ) ;
4141 if ( isNotEmpty ( fieldValue ) ) {
4242 this . setValues ( dropdownModelConfig , fieldValue , true ) ;
43- if ( this . configData . input . type === ParserType . OpenDropdown ) {
44- dropdownModelConfig . openType = true ;
45- } else {
46- dropdownModelConfig . openType = false ;
4743 }
44+ dropdownModelConfig . openType = this . configData . input . type === ParserType . OpenDropdown ;
4845 layout = {
4946 element : {
5047 control : 'col'
@@ -53,8 +50,7 @@ export class DropdownFieldParser extends FieldParser {
5350 host : 'col'
5451 }
5552 } ;
56- const dropdownModel = new DynamicScrollableDropdownModel ( dropdownModelConfig , layout ) ;
57- return dropdownModel ;
53+ return new DynamicScrollableDropdownModel ( dropdownModelConfig , layout ) ;
5854 } else {
5955 throw Error ( `Controlled Vocabulary name is not available. Please check the form configuration file.` ) ;
6056 }
You can’t perform that action at this time.
0 commit comments