diff --git a/.changeset/virtual-list-range.md b/.changeset/virtual-list-range.md new file mode 100644 index 00000000..ffda5b24 --- /dev/null +++ b/.changeset/virtual-list-range.md @@ -0,0 +1,6 @@ +--- +"@gpuix/native": patch +"@gpuix/react": patch +--- + +Report virtual-list visible-range changes after data and layout updates. diff --git a/README.md b/README.md index 78299339..a9cd5952 100644 --- a/README.md +++ b/README.md @@ -2230,6 +2230,12 @@ function MessageList({ messages }: { messages: Message[] }) { } ``` +`onVisibleRange` runs when the visible logical range changes, including after +the item count, mounted window, row-height estimate, or viewport size changes. +It does not run again when an update leaves the range unchanged. For example, +shrinking a list while scrolled near its end clamps the scroll position and +reports the new range so a windowed list can mount the rows now in view. + `role` and ARIA props on `` project an accessibility node exactly as they do on a `
`. Use `role="list"` on the list and `role="listitem"` on its rows to match the react-dom equivalent of `