Revision 60450
Added by Konstantinos Triantafyllou about 3 years ago
input.component.ts | ||
---|---|---|
252 | 252 |
private filter(value: string): Option[] { |
253 | 253 |
let options = this.options.filter(option => !this.formAsArray.value.find(value => option.value === value)); |
254 | 254 |
if (!value || value.length == 0) { |
255 |
return options;
|
|
255 |
return [];
|
|
256 | 256 |
} |
257 | 257 |
const filterValue = value.toString().toLowerCase(); |
258 | 258 |
return options.filter(option => option.label.toLowerCase().indexOf(filterValue) != -1); |
Also available in: Unified diff
[Library | Trunk]: Input on option filter return empty array for empty or null value