Skip to content

Commit 52b828e

Browse files
fix(data): set loaded to true on queryManySuccess (#3228)
Closes #3165 BREAKING CHANGES: Now both the `getWithQuery` and `getAll` methods are consistent and do set `loaded` property to true on dispatching their success actions respectively. BEFORE: The `getWithQuery` method would not set the `loaded` property to true upon success AFTER: The `getWithQuery` method sets the `loaded` property to true upon success
1 parent 996f1e8 commit 52b828e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

modules/data/spec/reducers/entity-collection-reducer.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ describe('EntityCollectionReducer', () => {
356356
const collection = state['Hero'];
357357

358358
expect(collection.ids).toEqual([3]);
359-
expect(collection.loaded).toBe(false);
359+
expect(collection.loaded).toBe(true);
360360
expect(collection.loading).toBe(false);
361361
});
362362

modules/data/src/reducers/entity-collection-reducer-methods.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ export class EntityCollectionReducerMethods<T> {
290290
collection,
291291
mergeStrategy
292292
),
293+
loaded: true,
293294
loading: false,
294295
};
295296
}

0 commit comments

Comments
 (0)