Skip to content

Commit 2ddb3fd

Browse files
committed
fix #862 Scroll loading does not work if the table is not displayed completely horizontally
1 parent 0195d45 commit 2ddb3fd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/BodyScrollPlugin.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ public void onBodyAdded(DataTable<T> dataTable) {
4141
}
4242
int offsetHeight = new Double(scrollElement.offsetHeight).intValue();
4343
int scrollHeight = new Double(scrollElement.scrollHeight).intValue();
44+
int clientHeight = new Double(scrollElement.clientHeight).intValue();
4445

4546
if (JsMath.abs(offsetHeight) + JsMath.abs(scrollTop)
46-
== new Double(scrollHeight).intValue()) {
47+
== new Double(scrollHeight + (offsetHeight - clientHeight)).intValue()) {
4748
dataTable.fireTableEvent(new BodyScrollEvent(ScrollPosition.BOTTOM));
4849
}
4950
});

0 commit comments

Comments
 (0)