Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: TanStack/virtual
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.0.1
Choose a base ref
...
head repository: TanStack/virtual
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.0.2
Choose a head ref
  • 4 commits
  • 33 files changed
  • 4 contributors

Commits on Dec 4, 2023

  1. release: v3.0.1

    tannerlinsley committed Dec 4, 2023
    Copy the full SHA
    62d6dc8 View commit details

Commits on Dec 22, 2023

  1. Copy the full SHA
    26dca7c View commit details

Commits on Jan 10, 2024

  1. Copy the full SHA
    0a73be9 View commit details

Commits on Jan 17, 2024

  1. Copy the full SHA
    942791b View commit details
Showing with 54 additions and 36 deletions.
  1. +2 −2 docs/api/virtualizer.md
  2. +1 −1 examples/react/dynamic/package.json
  3. +1 −1 examples/react/fixed/package.json
  4. +1 −1 examples/react/infinite-scroll/package.json
  5. +1 −1 examples/react/padding/package.json
  6. +1 −1 examples/react/scroll-padding/package.json
  7. +1 −1 examples/react/smooth-scroll/package.json
  8. +1 −1 examples/react/sticky/package.json
  9. +1 −1 examples/react/table/package.json
  10. +1 −1 examples/react/variable/package.json
  11. +1 −1 examples/react/window/package.json
  12. +1 −1 examples/svelte/dynamic/package.json
  13. +1 −1 examples/svelte/fixed/package.json
  14. +1 −1 examples/svelte/infinite-scroll/package.json
  15. +1 −1 examples/svelte/smooth-scroll/package.json
  16. +1 −1 examples/svelte/sticky/package.json
  17. +1 −1 examples/svelte/table/package.json
  18. +1 −1 examples/vue/dynamic/package.json
  19. +1 −1 examples/vue/fixed/package.json
  20. +1 −1 examples/vue/infinite-scroll/package.json
  21. +1 −1 examples/vue/padding/package.json
  22. +1 −1 examples/vue/scroll-padding/package.json
  23. +1 −1 examples/vue/smooth-scroll/package.json
  24. +1 −1 examples/vue/sticky/package.json
  25. +1 −1 examples/vue/table/package.json
  26. +1 −1 examples/vue/variable/package.json
  27. +1 −1 packages/react-virtual/package.json
  28. +1 −1 packages/solid-virtual/package.json
  29. +1 −1 packages/svelte-virtual/package.json
  30. +1 −1 packages/virtual-core/package.json
  31. +3 −1 packages/virtual-core/src/index.ts
  32. +1 −1 packages/vue-virtual/package.json
  33. +19 −3 pnpm-lock.yaml
4 changes: 2 additions & 2 deletions docs/api/virtualizer.md
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ The total number of items to virtualize.
getScrollElement: () => TScrollElement
```

A function that returns the scrollable element for the virtualizer. It may return undefined if the element is not available yet.
A function that returns the scrollable element for the virtualizer. It may return null if the element is not available yet.

### `estimateSize`

@@ -288,7 +288,7 @@ By default the `measureElement` virtualizer option is configured to measure elem
### `resizeItem`
```tsx
resizeItem: (index: number, size: number) => void
resizeItem: (item: VirtualItem, size: number) => void
```
Change the virtualized item's size manually. Use this function to manually set the size calculated for this item. Useful in occations when using some custom morphing transition and you know the morphed item's size beforehand.
2 changes: 1 addition & 1 deletion examples/react/dynamic/package.json
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
},
"dependencies": {
"@faker-js/faker": "7.6.0",
"@tanstack/react-virtual": "3.0.0",
"@tanstack/react-virtual": "3.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
2 changes: 1 addition & 1 deletion examples/react/fixed/package.json
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
"serve": "vite preview"
},
"dependencies": {
"@tanstack/react-virtual": "3.0.0",
"@tanstack/react-virtual": "3.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
2 changes: 1 addition & 1 deletion examples/react/infinite-scroll/package.json
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
"start": "vite"
},
"dependencies": {
"@tanstack/react-virtual": "3.0.0",
"@tanstack/react-virtual": "3.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-query": "^3.39.1"
2 changes: 1 addition & 1 deletion examples/react/padding/package.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
"dependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2",
"@tanstack/react-virtual": "3.0.0"
"@tanstack/react-virtual": "3.0.1"
},
"devDependencies": {
"@rollup/plugin-replace": "^4.0.0",
2 changes: 1 addition & 1 deletion examples/react/scroll-padding/package.json
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
},
"dependencies": {
"@react-hookz/web": "^14.2.2",
"@tanstack/react-virtual": "3.0.0",
"@tanstack/react-virtual": "3.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
2 changes: 1 addition & 1 deletion examples/react/smooth-scroll/package.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
"dependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2",
"@tanstack/react-virtual": "3.0.0"
"@tanstack/react-virtual": "3.0.1"
},
"devDependencies": {
"@rollup/plugin-replace": "^4.0.0",
2 changes: 1 addition & 1 deletion examples/react/sticky/package.json
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
},
"dependencies": {
"@faker-js/faker": "^7.1.0",
"@tanstack/react-virtual": "3.0.0",
"@tanstack/react-virtual": "3.0.1",
"lodash": "^4.17.21",
"react": "^17.0.2",
"react-dom": "^17.0.2"
2 changes: 1 addition & 1 deletion examples/react/table/package.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
"dependencies": {
"@faker-js/faker": "7.6.0",
"@tanstack/react-table": "^8.7.9",
"@tanstack/react-virtual": "3.0.0",
"@tanstack/react-virtual": "3.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
2 changes: 1 addition & 1 deletion examples/react/variable/package.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
"dependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2",
"@tanstack/react-virtual": "3.0.0"
"@tanstack/react-virtual": "3.0.1"
},
"devDependencies": {
"@rollup/plugin-replace": "^4.0.0",
2 changes: 1 addition & 1 deletion examples/react/window/package.json
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
"serve": "vite preview"
},
"dependencies": {
"@tanstack/react-virtual": "3.0.0",
"@tanstack/react-virtual": "3.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
2 changes: 1 addition & 1 deletion examples/svelte/dynamic/package.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
},
"dependencies": {
"@faker-js/faker": "^7.6.0",
"@tanstack/svelte-virtual": "3.0.0"
"@tanstack/svelte-virtual": "3.0.1"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^2.4.2",
2 changes: 1 addition & 1 deletion examples/svelte/fixed/package.json
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
"check": "svelte-check --tsconfig ./tsconfig.json"
},
"dependencies": {
"@tanstack/svelte-virtual": "3.0.0"
"@tanstack/svelte-virtual": "3.0.1"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^2.4.2",
2 changes: 1 addition & 1 deletion examples/svelte/infinite-scroll/package.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
},
"dependencies": {
"@tanstack/svelte-query": "^5.8.2",
"@tanstack/svelte-virtual": "3.0.0"
"@tanstack/svelte-virtual": "3.0.1"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^2.4.2",
2 changes: 1 addition & 1 deletion examples/svelte/smooth-scroll/package.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
},
"dependencies": {
"@faker-js/faker": "^7.1.0",
"@tanstack/svelte-virtual": "3.0.0",
"@tanstack/svelte-virtual": "3.0.1",
"lodash": "^4.17.21"
},
"devDependencies": {
2 changes: 1 addition & 1 deletion examples/svelte/sticky/package.json
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
"check": "svelte-check --tsconfig ./tsconfig.json"
},
"dependencies": {
"@tanstack/svelte-virtual": "3.0.0"
"@tanstack/svelte-virtual": "3.0.1"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^2.4.2",
2 changes: 1 addition & 1 deletion examples/svelte/table/package.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
},
"dependencies": {
"@tanstack/svelte-table": "^8.10.7",
"@tanstack/svelte-virtual": "3.0.0"
"@tanstack/svelte-virtual": "3.0.1"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^2.4.2",
2 changes: 1 addition & 1 deletion examples/vue/dynamic/package.json
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
},
"dependencies": {
"@faker-js/faker": "^7.6.0",
"@tanstack/vue-virtual": "3.0.0",
"@tanstack/vue-virtual": "3.0.1",
"vue": "^3.3.4"
},
"devDependencies": {
2 changes: 1 addition & 1 deletion examples/vue/fixed/package.json
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/vue-virtual": "3.0.0",
"@tanstack/vue-virtual": "3.0.1",
"vue": "^3.3.4"
},
"devDependencies": {
2 changes: 1 addition & 1 deletion examples/vue/infinite-scroll/package.json
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
},
"dependencies": {
"@tanstack/vue-query": "^4.37.0",
"@tanstack/vue-virtual": "3.0.0",
"@tanstack/vue-virtual": "3.0.1",
"vue": "^3.3.4"
},
"devDependencies": {
2 changes: 1 addition & 1 deletion examples/vue/padding/package.json
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/vue-virtual": "3.0.0",
"@tanstack/vue-virtual": "3.0.1",
"vue": "^3.3.4"
},
"devDependencies": {
2 changes: 1 addition & 1 deletion examples/vue/scroll-padding/package.json
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/vue-virtual": "3.0.0",
"@tanstack/vue-virtual": "3.0.1",
"@vueuse/core": "^10.5.0",
"vue": "^3.3.4"
},
2 changes: 1 addition & 1 deletion examples/vue/smooth-scroll/package.json
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/vue-virtual": "3.0.0",
"@tanstack/vue-virtual": "3.0.1",
"vue": "^3.3.4"
},
"devDependencies": {
2 changes: 1 addition & 1 deletion examples/vue/sticky/package.json
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
},
"dependencies": {
"@faker-js/faker": "^7.6.0",
"@tanstack/vue-virtual": "3.0.0",
"@tanstack/vue-virtual": "3.0.1",
"lodash": "^4.17.21",
"vue": "^3.3.4"
},
2 changes: 1 addition & 1 deletion examples/vue/table/package.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
"dependencies": {
"@faker-js/faker": "^7.6.0",
"@tanstack/vue-table": "^8.10.7",
"@tanstack/vue-virtual": "3.0.0",
"@tanstack/vue-virtual": "3.0.1",
"vue": "^3.3.4"
},
"devDependencies": {
2 changes: 1 addition & 1 deletion examples/vue/variable/package.json
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/vue-virtual": "3.0.0",
"@tanstack/vue-virtual": "3.0.1",
"vue": "^3.3.4"
},
"devDependencies": {
2 changes: 1 addition & 1 deletion packages/react-virtual/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tanstack/react-virtual",
"author": "Tanner Linsley",
"version": "3.0.0",
"version": "3.0.1",
"description": "Headless UI for virtualizing scrollable elements in React",
"license": "MIT",
"homepage": "https://github.com/tanstack/virtual#readme",
2 changes: 1 addition & 1 deletion packages/solid-virtual/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tanstack/solid-virtual",
"author": "Tanner Linsley",
"version": "3.0.0",
"version": "3.0.1",
"description": "Headless UI for virtualizing scrollable elements in Solid",
"license": "MIT",
"homepage": "https://github.com/tanstack/virtual#readme",
2 changes: 1 addition & 1 deletion packages/svelte-virtual/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tanstack/svelte-virtual",
"author": "Tanner Linsley",
"version": "3.0.0",
"version": "3.0.1",
"description": "Headless UI for virtualizing scrollable elements in Svelte",
"license": "MIT",
"homepage": "https://github.com/tanstack/virtual#readme",
2 changes: 1 addition & 1 deletion packages/virtual-core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tanstack/virtual-core",
"author": "Tanner Linsley",
"version": "3.0.0",
"version": "3.0.1",
"description": "Headless UI for virtualizing scrollable elements in TS/JS + Frameworks",
"license": "MIT",
"homepage": "https://github.com/tanstack/virtual#readme",
4 changes: 3 additions & 1 deletion packages/virtual-core/src/index.ts
Original file line number Diff line number Diff line change
@@ -653,7 +653,9 @@ export class Virtualizer<
const delta = size - itemSize

if (delta !== 0) {
if (item.start < this.scrollOffset) {
if (
item.start < this.scrollOffset + this.scrollAdjustments
) {
if (process.env.NODE_ENV !== 'production' && this.options.debug) {
console.info('correction', delta)
}
2 changes: 1 addition & 1 deletion packages/vue-virtual/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tanstack/vue-virtual",
"author": "Tanner Linsley",
"version": "3.0.0",
"version": "3.0.1",
"description": "Headless UI for virtualizing scrollable elements in Vue",
"license": "MIT",
"homepage": "https://github.com/tanstack/virtual#readme",
22 changes: 19 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.