@tanstack/svelte-virtual 3.13.49 → 3.13.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -1
- package/package.json +3 -2
- package/src/index.ts +3 -1
package/dist/index.js
CHANGED
|
@@ -4,14 +4,16 @@ export * from '@tanstack/virtual-core';
|
|
|
4
4
|
function createVirtualizerBase(initialOptions) {
|
|
5
5
|
const virtualizer = new Virtualizer(initialOptions);
|
|
6
6
|
const originalSetOptions = virtualizer.setOptions;
|
|
7
|
+
let onChange = initialOptions.onChange;
|
|
7
8
|
// eslint-disable-next-line prefer-const
|
|
8
9
|
let virtualizerWritable;
|
|
9
10
|
const setOptions = (options) => {
|
|
10
11
|
const resolvedOptions = {
|
|
11
12
|
...virtualizer.options,
|
|
13
|
+
onChange,
|
|
12
14
|
...options,
|
|
13
|
-
onChange: options.onChange,
|
|
14
15
|
};
|
|
16
|
+
onChange = resolvedOptions.onChange;
|
|
15
17
|
originalSetOptions({
|
|
16
18
|
...resolvedOptions,
|
|
17
19
|
onChange: (instance, sync) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/svelte-virtual",
|
|
3
|
-
"version": "3.13.
|
|
3
|
+
"version": "3.13.50",
|
|
4
4
|
"description": "Headless UI for virtualizing scrollable elements in Svelte",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"src"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@tanstack/virtual-core": "3.19.
|
|
44
|
+
"@tanstack/virtual-core": "3.19.9"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@sveltejs/package": "^2.3.11",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"test:eslint": "eslint ./src",
|
|
57
57
|
"test:types": "tsc",
|
|
58
58
|
"test:build": "publint --strict",
|
|
59
|
+
"test:lib": "vitest",
|
|
59
60
|
"build": "svelte-package --input ./src --output ./dist"
|
|
60
61
|
}
|
|
61
62
|
}
|
package/src/index.ts
CHANGED
|
@@ -30,6 +30,7 @@ function createVirtualizerBase<
|
|
|
30
30
|
): Readable<SvelteVirtualizer<TScrollElement, TItemElement>> {
|
|
31
31
|
const virtualizer = new Virtualizer(initialOptions)
|
|
32
32
|
const originalSetOptions = virtualizer.setOptions
|
|
33
|
+
let onChange = initialOptions.onChange
|
|
33
34
|
|
|
34
35
|
// eslint-disable-next-line prefer-const
|
|
35
36
|
let virtualizerWritable: Writable<Virtualizer<TScrollElement, TItemElement>>
|
|
@@ -39,9 +40,10 @@ function createVirtualizerBase<
|
|
|
39
40
|
) => {
|
|
40
41
|
const resolvedOptions = {
|
|
41
42
|
...virtualizer.options,
|
|
43
|
+
onChange,
|
|
42
44
|
...options,
|
|
43
|
-
onChange: options.onChange,
|
|
44
45
|
}
|
|
46
|
+
onChange = resolvedOptions.onChange
|
|
45
47
|
originalSetOptions({
|
|
46
48
|
...resolvedOptions,
|
|
47
49
|
onChange: (
|