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

createInnerSmartSelector

Generic types:P C

This is an internal function used by createSmartSelector. It is documented here for completeness. Use createSmartSelector instead.

createInnerSmartSelector wraps the specified child array with a Proxy that will request the items from the server as they are accessed (virtual data) rather than loading everything from the array up front.

In order to access the array without triggering a request, as is needed for a tree control that uses virtual data, the proxy adds support for a rawArray property that returns the original array before it was proxied.

See Also

Presentation

function createInnerSmartSelector(
  parentSelector: ParentSelector<P>,
  childDefinition: ChildDefinition<P, C>,
): MemoizedSelector<object, EntityState<P>, DefaultProjectorFn<EntityState<P>>>;

Returns

MemoizedSelector<object, EntityState<P>, DefaultProjectorFn<EntityState<P>>> -
  • an entity with the specified childArray proxies so that when an element is accessed, the childAction will be dispatched to request data from the server.

Parameters

NameTypeDescription
parentSelector
ParentSelector<P>

The ParentSelector to retrieve the parent data from the store.

childDefinition
ChildDefinition<P, C>

ChildDefinition that defines what the child should look like