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

ensureDataLoaded

Generic types:T

Internal function that ensures that the ID is loaded into the store for the entity by dispatching the action if it isn't.

Presentation

function ensureDataLoaded(
  entityState: EntityState<T>,
  id: string,
  feature: string,
  entity: string,
): void;

Returns

void

Parameters

NameTypeDescription
entityState
EntityState<T>

The entity to check for the id

id
string

The id to check for

feature
string

The feature this row belongs to

entity
string

The entity in the feature this row belongs to