Я думал, что это правильно, но это не работает:
selectClaimTypeById: ((any) => MemoizedSelector<any, ClaimType[]>) = (props: any) => createSelector (
this.claimtypeSelector,
(claimTypes: ClaimType[]) => claimTypes
.filter ((claimType: ClaimType) => (claimType.claimType === props.claimType)
))
select (this.claimtypeSelector) правильно возвращает массив ClaimTypes. Я ДУМАЛ, что приведенный выше код вызывается как select (selectClaimTypeById, {demandId: id}) * , вернет отфильтрованный массив с одним типом Claim.
Возвращает запомненный функция
this.store
.pipe (
select (this.selectors.selectClaimTypeById, {claimType: id}),
take (1))
.subscribe (data => record = data);
запись = запомненная функция
Я явно что-то пропустил
Любая помощь?