You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`wrapAround`|`boolean`|`false`| Wrap selection from end to start |
53
55
|`scrollDirection`|`"traditional" \| "natural"`|`"traditional"`| Mouse-wheel direction mode for this list |
@@ -62,6 +64,9 @@ ui.virtualList({
62
64
-**Mouse scroll wheel** scrolls the list (3 lines per tick).
63
65
-`scrollDirection: "traditional"` (default): wheel down moves viewport down.
64
66
-`scrollDirection: "natural"`: wheel down moves content down (trackpad-style).
67
+
-`ensureVisibleIndex` keeps a target item visible after render.
68
+
-`ensureVisibleMode: "always"` scrolls whenever the target is outside the viewport.
69
+
-`ensureVisibleMode: "sticky"` follows the target only while the user remains attached.
65
70
- The `onScroll` callback fires for both keyboard navigation and mouse wheel input.
66
71
67
72
## Notes
@@ -72,6 +77,8 @@ ui.virtualList({
72
77
- Returned `measureItemHeight` values are normalized before entering the measured-height cache: non-finite or non-positive values fall back to `estimatedHeight`, and positive values are truncated to whole cells with a minimum of 1.
73
78
- In estimate mode, visible items are measured and cached, then scroll math is corrected on the following frame.
74
79
- Measured-height cache is reused only while viewport width and item count stay the same; changing either triggers remeasurement.
80
+
- Sticky follow is disabled when keyboard or wheel input moves away from the target, and re-enabled when the viewport reaches the target again.
81
+
- Oversized sticky targets anchor their bottom edge to avoid scroll oscillation.
75
82
-`renderItem` receives a `focused` flag for styling.
76
83
-`selectionStyle` still applies to the selected row in estimate mode.
77
84
- The `range` passed to `onScroll` is `[startIndex, endIndex)` and includes overscan.
0 commit comments