aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared
diff options
context:
space:
mode:
Diffstat (limited to 'vid-webpack-master/src/app/shared')
-rw-r--r--vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/control.generator.util.service.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/control.generator.util.service.ts b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/control.generator.util.service.ts
index bcbcefa8d..fce6c6ec8 100644
--- a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/control.generator.util.service.ts
+++ b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/control.generator.util.service.ts
@@ -147,7 +147,7 @@ export class ControlGeneratorUtil {
case 'select' :
case 'boolean' : {
data.value = data.value || input.optionList.filter((option) => option.isDefault ? option.id || option.name : null);
- data.onInit = this.getSubscribeInitResult.bind(null, this.getInputsOptions.bind(this, input.optionList));
+ data.onInit = this.getSubscribeInitResult.bind(null, input.optionList == null ? this.getBooleanOptions : this.getInputsOptions.bind(this, input.optionList));
result.push(new DropdownFormControl(data));
break;
}
@@ -250,4 +250,11 @@ export class ControlGeneratorUtil {
]);
};
+ getBooleanOptions = (): Observable<SelectOption[]> => {
+ return of([
+ new SelectOption({id: 'true', name: 'true'}),
+ new SelectOption({id: 'false', name: 'false'})
+ ]);
+ };
+
}