最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

ngrx - upsertMany not picking up multiple updates for same id record - Stack Overflow

programmeradmin3浏览0评论

I am using the NGRX upsertMany and sending multiple partial as an array but it looks like when there are multiple updates in the same array for the same record only first one is picked e.g. when the below array is dispatched

[
  { id: '1', value1: 1, value2: 2 },
  { id: '1', value1: 1, value2: 3 }
  { id: '2', value1: 2, value2: 0 }
]

The store only updates

[
  { id: '1', value1: 1, value2: 2 },
  { id: '2', value1: 2, value2: 0 }
]

Is this correct? how can I force it to apply all updates using upsertMany?

NgRX version 18 is used.

Update

When I remove the sortComparer or set it to false all updates are applied correctly. How can I apply sort and all updates?

发布评论

评论列表(0)

  1. 暂无评论