UNPKG

rez-table-listing-mui

Version:

A rez table listing component built on TanStack Table

19 lines (18 loc) 461 B
export function deepMergeObjects<T>(target: T, source: Partial<T>): T { const output = { ...target }; for (const key in source) { if ( source[key] && typeof source[key] === "object" && !Array.isArray(source[key]) ) { output[key] = deepMergeObjects( (target as any)[key] || {}, (source as any)[key] ); } else { (output as any)[key] = source[key]; } } return output; }