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

mergeNewRowWithExisting

Generic types:T

Merges the new row with the existing row keeping the virtual array data in place if it is in the existing row.

Presentation

function mergeNewRowWithExisting(
  feature: string,
  entity: string,
  newRow: Record<keyof T, unknown> & T,
  existingRow: Record<keyof T, unknown> & SmartNgRXRowBase,
): T;

Returns

T -

merged row

Parameters

NameTypeDescription
feature
string

the name of the feature the row represent

entity
string

the name of the entity the row represent

newRow
Record<keyof T, unknown> & T

new row to merge

existingRow
Record<keyof T, unknown> & SmartNgRXRowBase

existing row to merge with