diff --git a/src/app/components/generic-select/generic-select.component.html b/src/app/components/generic-select/generic-select.component.html index 1d4c81a98c662650288f15242987ecf0761e3062..8edaab39d123f794448d7abf0090a5cc81ad6419 100644 --- a/src/app/components/generic-select/generic-select.component.html +++ b/src/app/components/generic-select/generic-select.component.html @@ -1,4 +1,4 @@ -<div class="btn-group" dropdown (selected)="onSelect($event)"> +<div class="btn-group" dropdown (click)="onSelect($event)"> <button dropdownToggle class="btn btn-primary dropdown-toggle waves-light my-1" type="button" mdbRippleRadius> {{ currentLabel }} </button> diff --git a/src/app/components/generic-select/generic-select.component.ts b/src/app/components/generic-select/generic-select.component.ts index a58c7cd559ccd8f92f610b65525ba38f9218a094..6614882ab63ed2f13e6b8fdcfe329dc97f7a6d80 100644 --- a/src/app/components/generic-select/generic-select.component.ts +++ b/src/app/components/generic-select/generic-select.component.ts @@ -30,7 +30,7 @@ export abstract class GenericSelectComponent<T> { */ public onSelect(event: any) { const val = event.target.value; - if (val) { + if (val !== undefined && val !== "") { // might be 0; opening the menu returns "" this.selectedValue = val; this._currentLabel = this.selectedLabel; }