Open
Description
Version info
Angular: 12.1.1
Firebase: 8.7.0
AngularFire: 6.1.5
Other (e.g. Ionic/Cordova, Node, browser, operating system): N/A
How to reproduce these conditions
Steps to set up and reproduce
- Create a list of objects with a "category" property
- Add items in the list
- Try to remove all objects having a certain value for the "category" property
Example of code
The following piece of code removes all objects regardless of the category property :
removeCategoryQuestions(currentCategory: string) {
this.db
.list<Evaluation>(
`interview-questions/${this.type}`,
ref => ref.orderByChild('category').equalTo(currentCategory))
.remove();
}
However, this piece of code displays only the objects having the right category value :
removeCategoryQuestions(currentCategory: string) {
const filteredListRef = this.db
.list<Evaluation>(
`interview-questions/${this.type}`,
ref => ref.orderByChild('category').equalTo(currentCategory));
filteredListRef.valueChanges().subscribe(evalu => console.log(evalu))
}
Expected behavior
.remove()
called on a filtered AngularFireList
should remove only the filtered objects.
Actual behavior
.remove()
called on a filtered AngularFireList
removes all objects, regardless of the filter applied.
Metadata
Metadata
Assignees
Labels
No labels