How to reset a RXJS scan operator based on another Observable

后端 未结 3 895
无人共我
无人共我 2021-01-18 03:49

I have a component which triggers an onScrollEnd event when the last item in a virtual list is rendered. This event will do a new API request to fetch the next

3条回答
  •  半阙折子戏
    2021-01-18 04:10

    Found a working solution: I check the current offset by using withLatestFrom before the scan operator and reset the accumulator if needed based on this value.

    Stackblitz demo

提交回复
热议问题