From 3a8ff9fd386bd374e779e52a92a38943bd3d63d5 Mon Sep 17 00:00:00 2001 From: Gustavo Oliveira Date: Sat, 21 Jun 2025 09:33:55 -0400 Subject: [PATCH 1/2] Add programatic scrolling section to documentation --- packages/vue-virtual-scroller/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/vue-virtual-scroller/README.md b/packages/vue-virtual-scroller/README.md index f978270a..3ff95a39 100644 --- a/packages/vue-virtual-scroller/README.md +++ b/packages/vue-virtual-scroller/README.md @@ -240,6 +240,13 @@ Example: ``` +### Programmatic Scrolling + +The virtual scroller components provide useful methods that allow you to programmatically scroll. + +* `scrollToItem(index)` - Available on RecycleScroller and DynamicScroller +* `scrollToPosition(position)` - Available on RecycleScroller +* `scrollToBottom()` - Available on DynamicScroller ### Page mode From 64632d12089634fc97dfaba510fcead664e7882b Mon Sep 17 00:00:00 2001 From: Gustavo Oliveira Date: Sat, 21 Jun 2025 09:48:04 -0400 Subject: [PATCH 2/2] Separate methods sections --- packages/vue-virtual-scroller/README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/vue-virtual-scroller/README.md b/packages/vue-virtual-scroller/README.md index 3ff95a39..3954c9a1 100644 --- a/packages/vue-virtual-scroller/README.md +++ b/packages/vue-virtual-scroller/README.md @@ -240,13 +240,10 @@ Example: ``` -### Programmatic Scrolling +### Methods -The virtual scroller components provide useful methods that allow you to programmatically scroll. - -* `scrollToItem(index)` - Available on RecycleScroller and DynamicScroller -* `scrollToPosition(position)` - Available on RecycleScroller -* `scrollToBottom()` - Available on DynamicScroller +* `scrollToItem(index)` - Scrolls to the item at the given index. +* `scrollToPosition(position)` - Scrolls to the given position in pixels. ### Page mode @@ -395,6 +392,11 @@ Extends all the RecycleScroller scoped slot props. Extends all the RecycleScroller other slots. +### Methods + +* `scrollToItem(index)` - Scrolls to the item at the given index. +* `scrollToBottom()` - Scrolls to the end of the list. + ## DynamicScrollerItem The component that should wrap all the items in a DynamicScroller.