Skip to content

Commit 9c927d1

Browse files
mlopezFCjavier-godoy
authored andcommitted
fix: fix sorting issue in docx & pdf exports
Fix sorting issue by using the correct variable when exporting the rows Fixes #28
1 parent 074a220 commit 9c927d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/flowingcode/vaadin/addons/gridexporter/DocxInputStreamFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ private void fillData(XWPFTable table, XWPFTableCell dataCell, DataProvider<T, ?
153153
dataStream.forEach(t -> {
154154
XWPFTableRow currentRow = startingCell[0].getTableRow();
155155
if (!firstRow[0]) {
156-
currentRow = table.insertNewTableRow(dataCell.getTableRow().getTable().getRows().indexOf(dataCell.getTableRow())+1);
156+
currentRow = table.insertNewTableRow(dataCell.getTableRow().getTable().getRows().indexOf(startingCell[0].getTableRow())+1);
157157
Iterator<Column<T>> iterator = exporter.columns.iterator();
158158
while (iterator.hasNext()) {
159159
iterator.next();

0 commit comments

Comments
 (0)