diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/summary/SummaryPlugin.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/summary/SummaryPlugin.java index 88f1491c5..19e176c5f 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/summary/SummaryPlugin.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/summary/SummaryPlugin.java @@ -52,6 +52,10 @@ public void onFooterAdded(DataTable datatable) { public SummaryPlugin setSummaryRecords(Collection records) { summaryRows.forEach(BaseDominoElement::remove); summaryRows.clear(); + if (this.dataTable.getRows() + .isEmpty()) { + return this; + } List recordsList = new ArrayList<>(records); for (int i = 0; i < recordsList.size(); i++) { SummaryRow summaryRow = new SummaryRow<>(recordsList.get(i), i, this.dataTable);