Skip to content
Advertisement

Don’t show blank record on autocomplete in Angular

I have this autocomplete in Angular

JavaScript

we use this filter function

JavaScript

but issue is if i get those records also where Name is blank how should i remove that blank record from result.

Advertisement

Answer

You would need to add an additional check in the filter function, where you can check if Name property exist on object !!a.Name

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement