From c9c96294f1bb75800d2a9154d547c873012e491e Mon Sep 17 00:00:00 2001 From: alancqueiroz <67958316+alancqueiroz@users.noreply.github.com> Date: Wed, 21 Oct 2020 11:19:20 -0300 Subject: [PATCH] fix: pass both tree parent nodes and children nodes when exporting Fix export all data to excel with treeview bug. Example: http://plnkr.co/edit/hFPAO6W3EW8nlzt2 fix #7127, fix #6819 --- packages/exporter/src/js/exporter.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/packages/exporter/src/js/exporter.js b/packages/exporter/src/js/exporter.js index edccf756f4..9e704298a8 100755 --- a/packages/exporter/src/js/exporter.js +++ b/packages/exporter/src/js/exporter.js @@ -952,21 +952,17 @@ * recurse down into the children to get to the raw data element * which is a row without children (a leaf). * @param {Node} aNode the tree node on the grid - * @returns {Array} an array of leaf nodes + * @returns {Array} an array with all child nodes from aNode */ getRowsFromNode: function(aNode) { - var rows = []; - for (var i = 0; i 0) { + for (var i = 0; i < aNode.children.length; i++) { + rows = rows.concat(this.getRowsFromNode(aNode.children[i])); + } } return rows; }, - /** * @ngdoc function * @name getDataSorted