aio-class 2.1.0 → 2.1.1
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/index.d.ts +1 -0
- package/index.js +4 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -251,6 +251,7 @@ export declare class EntityClass<T> {
|
|
|
251
251
|
traverse: (rows: T[], callback: (row: T, detail: I_rowResult<T>) => false | undefined) => T[];
|
|
252
252
|
};
|
|
253
253
|
dataActions: {
|
|
254
|
+
getRowDetailById: (rowId: any) => false | I_rowResult<T>;
|
|
254
255
|
addRow: (row: T, p: {
|
|
255
256
|
parentId?: I_id;
|
|
256
257
|
index?: number;
|
package/index.js
CHANGED
|
@@ -1848,6 +1848,10 @@ export class EntityClass {
|
|
|
1848
1848
|
traverse: this.traverse
|
|
1849
1849
|
};
|
|
1850
1850
|
this.dataActions = {
|
|
1851
|
+
getRowDetailById: (rowId) => {
|
|
1852
|
+
const data = this.getData();
|
|
1853
|
+
return this.getRowDetailById(data, rowId);
|
|
1854
|
+
},
|
|
1851
1855
|
addRow: (row, p) => {
|
|
1852
1856
|
const data = this.getData();
|
|
1853
1857
|
const res = this.addRow(data, row, p);
|