diff --git a/sharedComponents/input/input.component.ts b/sharedComponents/input/input.component.ts index bce8102c..ffd4c6c9 100644 --- a/sharedComponents/input/input.component.ts +++ b/sharedComponents/input/input.component.ts @@ -96,12 +96,13 @@ export interface Option {
{{placeholder}}
+
@@ -149,6 +150,7 @@ export class InputComponent implements OnInit, OnDestroy, OnChanges { @Input() smallChip: boolean = false; @Input() panelWidth: number = 300; @Input() panelClass: string = null; + @Input() showOptionsOnEmpty: boolean = true; @Output() focusEmitter: EventEmitter = new EventEmitter(); /** Internal basic information */ public required: boolean = false; @@ -250,7 +252,7 @@ export class InputComponent implements OnInit, OnDestroy, OnChanges { private filter(value: string): Option[] { let options = this.options.filter(option => !this.formAsArray.value.find(value => option.value === value)); - if (!value || value.length == 0) { + if ((!value || value.length == 0) && !this.showOptionsOnEmpty) { return []; } const filterValue = value.toString().toLowerCase();