@den4ik92/ng2-smart-table 21.7.2 → 21.7.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -10,6 +10,7 @@ declare abstract class DataSource<T extends BaseDataType = any> {
|
|
|
10
10
|
protected readonly onChangedSource: Subject<SmartTableOnChangedEvent>;
|
|
11
11
|
protected readonly sortConf: _angular_core.WritableSignal<SmartTableSortItem | null>;
|
|
12
12
|
protected readonly filters: _angular_core.WritableSignal<SmartTableFilterItem[]>;
|
|
13
|
+
idKey?: string;
|
|
13
14
|
readonly pagingConf: _angular_core.WritableSignal<SmartTablePagerSettings>;
|
|
14
15
|
protected readonly data: _angular_core.WritableSignal<T[]>;
|
|
15
16
|
/**
|
|
@@ -67,6 +68,12 @@ interface ColumnPositionState {
|
|
|
67
68
|
interface SmartTableSettings<T extends BaseDataType = any> {
|
|
68
69
|
selectMode?: 'single' | 'multi';
|
|
69
70
|
mode?: 'inline' | 'external';
|
|
71
|
+
/**
|
|
72
|
+
* @description Key used to identify and compare row objects. When set, objects are compared
|
|
73
|
+
* by this field instead of the default heuristic (uuid → id → deep equality).
|
|
74
|
+
* @example 'id' | 'uuid' | 'code'
|
|
75
|
+
*/
|
|
76
|
+
idKey?: keyof T & string;
|
|
70
77
|
cellEmptyText?: string;
|
|
71
78
|
resetSortOnThirdClick?: boolean;
|
|
72
79
|
columnSort?: {
|
|
@@ -334,6 +341,7 @@ declare class DataSet {
|
|
|
334
341
|
protected columnSettings: SmartTableColumnSettings[];
|
|
335
342
|
readonly editorInputClass: string;
|
|
336
343
|
readonly cellEmptyText?: string | undefined;
|
|
344
|
+
idKey?: string | undefined;
|
|
337
345
|
newRow: Row;
|
|
338
346
|
protected readonly data: _angular_core.WritableSignal<any[]>;
|
|
339
347
|
protected readonly columns: _angular_core.WritableSignal<Column[]>;
|
|
@@ -343,7 +351,7 @@ declare class DataSet {
|
|
|
343
351
|
readonly getVisibleColumns: _angular_core.Signal<Column[]>;
|
|
344
352
|
readonly getRows: _angular_core.Signal<Row[]>;
|
|
345
353
|
readonly isAllSelected: _angular_core.Signal<boolean>;
|
|
346
|
-
constructor(dataList: any[] | undefined, columnSettings: SmartTableColumnSettings[], editorInputClass: string, cellEmptyText?: string | undefined);
|
|
354
|
+
constructor(dataList: any[] | undefined, columnSettings: SmartTableColumnSettings[], editorInputClass: string, cellEmptyText?: string | undefined, idKey?: string | undefined);
|
|
347
355
|
setData(data: any[]): void;
|
|
348
356
|
setColumnsConfig(columnSettings: SmartTableColumnSettings[]): void;
|
|
349
357
|
findRowByData(data: any): Row | undefined;
|