Multiple valueChange subscriptions for same collection leads to one subscription firing changes for another
- 主要言語
- TypeScript
- スター
- 7.8k
- フォーク
- 2.2k
- 平均マージ
- 22時間 28分
- マージ済み PR(30日)
- 6
説明
### Version info
**Angular:** 10.0.9
**Firebase:** ^7.13.1
**AngularFire:** ^6.02
**Other (e.g. Ionic/Cordova, Node, browser, operating system):**
### How to reproduce these conditions
Create multiple valueChange subscriptions to the same collection (with a different query)
```
this.db.collection('/people/' + this.selectedPeopleId + '/messages', ref => ref.orderBy("createdDate").limitToLast(100)).valueChanges({idField: 'documentId'}).subscribe(messageUpdates =>
```
AND
```
this.db.collection('/people/' + this.selectedPeopleId + '/messages', ref => ref.where("type", ">", 0).limitToLast(100)).valueChanges({idField: 'documentId'}).subscribe(messageUpdates =>
```
In my case, I am unsubscribing from the second listener and recreating it with a different limitToLast value (though I'm unsure if that's necessary to reproduce)
### Debug output
none
### Expected behavior
Each valueChange listener should only fire results for itself
### Actual behavior
the first listener is returning valueChanges that match the query for the second listener.
コントリビューションガイド
調査の方向性
Start at the AngularFire collection().valueChanges() entry point and reproduce the two subscriptions against the same /people/.../messages collection with different queries. Verify that unsubscribing and recreating the second listener does not alter results delivered to the first; done means each subscription emits only its own query results.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, firebase, typescript
- 領域
- database
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100