Skip to content

Commit

Permalink
fix(data): set loaded to true on queryManySuccess (#3228)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
WojciechKasprzyk authored Nov 10, 2021
1 parent 996f1e8 commit 52b828e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ describe('EntityCollectionReducer', () => {
const collection = state['Hero'];

expect(collection.ids).toEqual([3]);
expect(collection.loaded).toBe(false);
expect(collection.loaded).toBe(true);
expect(collection.loading).toBe(false);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ export class EntityCollectionReducerMethods<T> {
collection,
mergeStrategy
),
loaded: true,
loading: false,
};
}
Expand Down

0 comments on commit 52b828e

Please sign in to comment.