diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/multiple-input-widget.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/multiple-input-widget.component.html index bf225cda84..8865b06b8e 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/multiple-input-widget.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/multiple-input-widget.component.html @@ -112,7 +112,7 @@ (focus)="key.isFocused = true;" (blur)="key.isFocused = false; inputChanged(source, key)"> {{ getCustomTranslationText(option.label ? option.label : option.value) }} diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/multiple-input-widget.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/multiple-input-widget.component.ts index 04f835b718..f7c681135e 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/multiple-input-widget.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/multiple-input-widget.component.ts @@ -59,7 +59,7 @@ interface MultipleInputWidgetSettings { } interface MultipleInputWidgetSelectOption { - value: string; + value: string | null; label: string; } @@ -253,6 +253,14 @@ export class MultipleInputWidgetComponent extends PageComponent implements OnIni } // For backward compatibility + if (dataKey.settings.dataKeyValueType === 'select') { + dataKey.settings.selectOptions.forEach((option) => { + if (option.value.toLowerCase() === 'null') { + option.value = null; + } + }); + } + source.keys.push(dataKey); }); } else { @@ -452,10 +460,6 @@ export class MultipleInputWidgetComponent extends PageComponent implements OnIni } public getCustomTranslationText(value): string { - if (value.toLowerCase() === 'null') { - return ''; - } - return this.utils.customTranslation(value, value); }