Skip to content

Commit

Permalink
feat: add support for controlling scrolling of inner virtual list
Browse files Browse the repository at this point in the history
  • Loading branch information
mlopezFC committed Sep 13, 2024
1 parent a94aabb commit 4275caf
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,5 +272,32 @@ public Component getFooterComponent() {
return footerComponent;
}

/**
* Scrolls to the given row index. Scrolls so that the element is shown at
* the start of the visible area whenever possible.
* <p>
* If the index parameter exceeds current item set size the grid will scroll
* to the end.
*
* @param rowIndex
* zero based index of the item to scroll to in the current view.
*/
public void scrollToIndex(int position) {
this.content.scrollToIndex(position);
}

/**
* Scrolls to the first element.
*/
public void scrollToStart() {
this.content.scrollToStart();
}

/**
* Scrolls to the last element of the list.
*/
public void scrollToEnd() {
this.content.scrollToEnd();
}

}

0 comments on commit 4275caf

Please sign in to comment.