[Library | Trunk]: Input on option filter return empty array for empty or null value
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60450 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
f5d4a58b05
commit
ce59d4e8bf
|
@ -252,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) {
|
||||
return options;
|
||||
return [];
|
||||
}
|
||||
const filterValue = value.toString().toLowerCase();
|
||||
return options.filter(option => option.label.toLowerCase().indexOf(filterValue) != -1);
|
||||
|
|
Loading…
Reference in New Issue