From 69a62f28292bec5da9595846850a26335c688ab2 Mon Sep 17 00:00:00 2001 From: Mike Ryan Date: Sun, 4 Mar 2018 13:17:29 -0600 Subject: [PATCH] feat(Entity): Add 'selectId' and 'sortComparer' to state adapter (#889) --- modules/entity/src/create_adapter.ts | 2 ++ modules/entity/src/models.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/modules/entity/src/create_adapter.ts b/modules/entity/src/create_adapter.ts index c51f85295f..02f345c218 100644 --- a/modules/entity/src/create_adapter.ts +++ b/modules/entity/src/create_adapter.ts @@ -29,6 +29,8 @@ export function createEntityAdapter( : createUnsortedStateAdapter(selectId); return { + selectId, + sortComparer, ...stateFactory, ...selectorsFactory, ...stateAdapter, diff --git a/modules/entity/src/models.ts b/modules/entity/src/models.ts index 9f763391b9..4e60955388 100644 --- a/modules/entity/src/models.ts +++ b/modules/entity/src/models.ts @@ -76,6 +76,8 @@ export type EntitySelectors = { }; export interface EntityAdapter extends EntityStateAdapter { + selectId: IdSelector; + sortComparer: false | Comparer; getInitialState(): EntityState; getInitialState(state: S): EntityState & S; getSelectors(): EntitySelectors>;