collectionChanges is firing for every element on a single deletion
Evaluación
Este issue todavía no se ha evaluado.
Descripción
I have AngularFire/RxFire code similar to the following:
collectionChanges(
collection(this.firestore, "col1/doc1/col2"))
.subscribe(changes => {
console.log('RxFire changes', changes);
});
This generally works: When the page loads, I get added events for every document in the collection. When a document changes, a single modified event fires. However, when a document is deleted, the next change batch includes a removed event (good) and also a modified event for every other element in the collection (bad). 🤔
Any idea why these extra modify events are happening + how to avoid all the extra reads? or is this all from the cache?
I've verified there's no actual change to the other documents in the collection. A single modified change mentions oldIndex and newIndex so I wonder if it's maybe trying to update the index of every element, but there isn't a sort order so any index is undefined anyways.
If it's helpful, as a test I tried the equivalent Firebase code:
const q = query(collection(this.firestore, "collection1/doc1/collection2"));
onSnapshot(q, (snapshot) => {
const docs = snapshot.docChanges();
console.log("Changes received", docs);
});
This works as expected and only fires one removed event, which is why I think the bug is in RxFire.
- Lenguaje dominante
- TypeScript
- Estrellas
- 150
- Forks
- 50
- Merge medio
- 11 d 6 h
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de FirebaseExtended/rxfire
-
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
FirebaseExtended/rxfire#105 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
FirebaseExtended/rxfire#94 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 35/100
FirebaseExtended/rxfire#90 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
FirebaseExtended/rxfire#88 · 10 comentarios · 14 reacciones ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
FirebaseExtended/rxfire#84 · 1 comentario · 2 reacciones ·
Todos los issues de FirebaseExtended/rxfire
Issues similares
-
[Bug]: [MCP/CLI] Bare loopback IP addresses (127.0.0.1:port) and hosts with ports fail to navigate due to erroneous scheme inferencePosiblemente ocupada @alok-108 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
microsoft/playwright#43263 ·
Los mantenedores suelen responder en 1 día
-
bug priority:medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
lingdojo/kana-dojo#32018 · 1 comentario · 5 reacciones ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
paperclipai/paperclip#15751 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
BuilderIO/agent-native#7275 ·
Los mantenedores suelen responder en 1 día