We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c194adc commit 17fe494Copy full SHA for 17fe494
modules/entity/src/create_adapter.ts
@@ -1,4 +1,3 @@
1
-import { createSelector } from '@ngrx/store';
2
import {
3
EntityDefinition,
4
Comparer,
@@ -17,9 +16,8 @@ export function createEntityAdapter<T>(
17
16
} = {}
18
): EntityAdapter<T> {
19
const { selectId, sortComparer }: EntityDefinition<T> = {
20
- sortComparer: false,
21
- selectId: (instance: any) => instance.id,
22
- ...options,
+ selectId: options.selectId ?? ((entity: any) => entity.id),
+ sortComparer: options.sortComparer ?? false,
23
};
24
25
const stateFactory = createInitialStateFactory<T>();
0 commit comments