Home
Using Smart NgRX
Demo Walkthrough
API
@smarttools/smart-ngrx / Function

convertChildrenToArrayProxy

Generic types:P C

wraps the array in a proxy so we can return a row for the ID

Presentation

function convertChildrenToArrayProxy(
  parentEntity: EntityState<P>,
  parentFieldName: keyof P,
  child: EntityState<C>,
  childDefinition: ChildDefinition<P, C>,
): void;

Returns

void

Parameters

NameTypeDescription
parentEntity
EntityState<P>

the entity that holds the parent rows

parentFieldName
keyof P

the field name that holds the child ids

child
EntityState<C>

the child entity

childDefinition
ChildDefinition<P, C>

the child definition (used by the ArrayProxy)