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

SmartArray

Generic types:P C

Interface that allows us to access the rawArray field and the addToStore and removeFromStore methods on a SmartArray

Properties

NameTypeDescription
length
number

Methods

addToStore()

Adds a new row to the store

Presentation
addToStore(newRow: C, thisRow: P): void;
Parameters
NameTypeDescription
newRow
C

The new row to add

thisRow
P

The parent row

Returns
void

getIdAtIndex()

The array of IDs proxied by the ArrayProxy

Presentation
getIdAtIndex(index: number): string | undefined;
Parameters
NameTypeDescription
index
number
Returns
string | undefined

removeFromStore()

Removes a row from the store

Presentation
removeFromStore(row: C, parent: P): void;
Parameters
NameTypeDescription
row
C
parent
P
Returns
void