I have the following code, I would like to filter all records that return through a SearchBar , I can not find a way to filter the data that is returned from the database and display on the screen for the user.
ngOnInit(){
this.itemsCol = this.afs.collection('items');
this.items = this.pacientesCol.snapshotChanges()
.map(actions => {
return actions.map(a => {
const data = a.payload.doc.data() as Item;
const id = a.payload.doc.id;
return { id, data};
})
})
}