Welcome to the React feedback portal. We’re happy you’re here! If you have feedback on how to improve the React, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

I have a grid with a detail template. When I group by a column and then do a PdfExport my CPU jumped to 100%. Using the debugger pretty sure I'm encountering an infinite loop.




             if (!this.hideColumnInclude) {

                    while (cell.visible === undefined) {

                        if (cell.cellType === CellType.DetailFooterIntent) {

                            continue;

                        }



Around line 796 in pdf-export.js in PdfExport.prototype.processAggregates.



In row.cells the index of 1 seems to be the detail column maybe? It seems like this is the one it gets stuck on. isDataCell is false, isTemplate is false, headerText is undefined.


Here are all the properties of that cell.

1: Cell

attributes: {style: {…}, e-mappinguid: 'grid-column87', index: undefined}

cellType: 15

column:

headerText: undefined

[[Prototype]]: Object

isDataCell: false

isRowSpanned: false

isSpanned: false

isTemplate: undefined

visible: undefined



What I noticed in the debugger is that cell.visible = 15 and CellType.DetailFooterIntent also equals 15. So the continue; fires and then it causes an infinite loop as nothing about the cell.visible == undefined would have changed. While loops can certianly be fun :). I think the solution would be to use break vs continue so you loop to the next column, but I'm not super familiar with the pdfExport.js file.



Somehow setting includeHiddenColumn : true fixes this issues becuase this.hideColumnInclude becomes true and so the logic branch doesn't seem to fire. This might not be ideal as the user probably doesn't want hidden columns to be in the export.