Hi Jb,

I usually take care of filtering outside of my tables. I created a small 
sample 
<https://github.com/SanderElias/Samples/blob/master/src/app/filter-samp/filter-sample/filter-sample.component.ts>
 
for you. You can check out the repo and play with it.
The gist of it is this:

nameFilter = new FormControl('');

filter$ = this.nameFilter.valueChanges.pipe(
debounceTime(500),
distinctUntilChanged(),
startWith(''),
map((name: string) => name.trim().toLocaleLowerCase())
);

users$ = this.us.userCards$;

vm$ = combineLatest([this.users$, this.filter$]).pipe(
map(([users, filterStr]: Vm) => ({
users: users.filter(row =>
filterStr ? row.name.toLocaleLowerCase().includes(filterStr) : true
)
}))
);

I'm using a ViewModel to get my updated data into the view. 
Play with the sample, and if you have any questions don't hesitate to ask.

Regards
Sander


-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to