aio-class 2.1.1 → 2.1.2
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 +2 -1
- package/index.js +4 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -248,7 +248,7 @@ export declare class EntityClass<T> {
|
|
|
248
248
|
reOrderByDir: (data: T[], rowId: I_id, dir: 1 | -1) => T[];
|
|
249
249
|
moveTo: (data: T[], fromIds: I_id[], toId: I_id) => T[];
|
|
250
250
|
editByTraverse: (rows: T[], callback: (row: T) => T | false) => T[];
|
|
251
|
-
traverse: (rows: T[], callback: (row: T, detail: I_rowResult<T>) => false | undefined) =>
|
|
251
|
+
traverse: (rows: T[], callback: (row: T, detail: I_rowResult<T>) => false | undefined) => void;
|
|
252
252
|
};
|
|
253
253
|
dataActions: {
|
|
254
254
|
getRowDetailById: (rowId: any) => false | I_rowResult<T>;
|
|
@@ -269,6 +269,7 @@ export declare class EntityClass<T> {
|
|
|
269
269
|
editByTraverse: (callback: (row: T) => T | false) => T[];
|
|
270
270
|
getSortedTree: (sorts: I_sort<T>[]) => T[];
|
|
271
271
|
getFilteredTree: (filter: (row: T, detail: I_rowResult<T>) => boolean | undefined) => T[];
|
|
272
|
+
traverse: (callback: (row: T, detail: I_rowResult<T>) => false | undefined) => void;
|
|
272
273
|
};
|
|
273
274
|
}
|
|
274
275
|
type I_color = any;
|
package/index.js
CHANGED
|
@@ -1826,7 +1826,6 @@ export class EntityClass {
|
|
|
1826
1826
|
}
|
|
1827
1827
|
};
|
|
1828
1828
|
fn(rows, []);
|
|
1829
|
-
return rows;
|
|
1830
1829
|
};
|
|
1831
1830
|
this.actions = {
|
|
1832
1831
|
getId: this.getId,
|
|
@@ -1917,6 +1916,10 @@ export class EntityClass {
|
|
|
1917
1916
|
const res = this.getFilteredTree(data, filter);
|
|
1918
1917
|
this.setData(res);
|
|
1919
1918
|
return res;
|
|
1919
|
+
},
|
|
1920
|
+
traverse: (callback) => {
|
|
1921
|
+
const data = this.getData();
|
|
1922
|
+
this.traverse(data, callback);
|
|
1920
1923
|
}
|
|
1921
1924
|
};
|
|
1922
1925
|
this.params = p;
|