Skip to content

Commit 531f4c1

Browse files
committed
function replaced
1 parent cbf8710 commit 531f4c1

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/utils/data-manager.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,19 @@ export default class DataManager {
318318
this.sorted = this.grouped = false;
319319
}
320320

321+
expandTreeForNodes = (data) => {
322+
data.forEach(row => {
323+
let currentRow = row;
324+
while (this.parentFunc(currentRow, this.data)) {
325+
let parent = this.parentFunc(currentRow, this.data);
326+
if (parent) {
327+
parent.tableData.isTreeExpanded = true;
328+
}
329+
currentRow = parent;
330+
}
331+
});
332+
}
333+
321334
findDataByPath = (renderData, path) => {
322335
if (this.isDataType("tree")) {
323336
const node = path.reduce((result, current) => {
@@ -552,19 +565,6 @@ export default class DataManager {
552565
this.filtered = true;
553566
}
554567

555-
expandTreeForNodes = (data) => {
556-
data.forEach(row => {
557-
let currentRow = row;
558-
while (this.parentFunc(currentRow, this.data)) {
559-
let parent = this.parentFunc(currentRow, this.data);
560-
if (parent) {
561-
parent.tableData.isTreeExpanded = true;
562-
}
563-
currentRow = parent;
564-
}
565-
});
566-
}
567-
568568
searchData = () => {
569569
this.grouped = this.treefied = this.sorted = this.paged = false;
570570

0 commit comments

Comments
 (0)