From bb70e6ccb3d7d8ca11ba67db2ba3b18b67b0040d Mon Sep 17 00:00:00 2001 From: Jay Bell Date: Sat, 30 Jan 2021 06:02:06 -0800 Subject: [PATCH] fix(data): make entity param partial when is not optimistic (#2899) Closes #2870 --- .../src/entity-services/entity-collection-service-base.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/data/src/entity-services/entity-collection-service-base.ts b/modules/data/src/entity-services/entity-collection-service-base.ts index ed70c7c078..250d88c7bf 100644 --- a/modules/data/src/entity-services/entity-collection-service-base.ts +++ b/modules/data/src/entity-services/entity-collection-service-base.ts @@ -141,6 +141,10 @@ export class EntityCollectionServiceBase< * @returns Observable of the entity * after server reports successful save or the save error. */ + add( + entity: Partial, + options: Omit & { isOptimistic: true } + ): Observable; add(entity: T, options?: EntityActionOptions): Observable { return this.dispatcher.add(entity, options); }