Refactor distinctUntilChanged to use a custom equality check in pickup-shelf-details.store.ts

This commit is contained in:
Nino
2024-11-25 15:31:24 +01:00
parent b926efb635
commit f97253e82a

View File

@@ -70,7 +70,7 @@ export class PickupShelfDetailsStore extends ComponentStore<PickupShelfDetailsSt
this.select((s) => s).pipe(switchMap((s) => this._listStore.itemsForPreview$(s))),
]).pipe(
map(([orderItems, itemsForPreview]) => (orderItems?.length ? orderItems : itemsForPreview)),
distinctUntilChanged(isEqual),
distinctUntilChanged((a, b) => isEqual(a, b)),
);
get orderItems() {