@tanstack/vue-virtual
Advanced tools
Comparing version 3.0.0-beta.65 to 3.0.0-beta.66
@@ -33,5 +33,5 @@ /** | ||
virtualizer.setOptions(_extends({}, options, { | ||
onChange: function onChange(instance) { | ||
onChange: function onChange(instance, sync) { | ||
triggerRef(state); | ||
options.onChange == null ? void 0 : options.onChange(instance); | ||
options.onChange == null ? void 0 : options.onChange(instance, sync); | ||
} | ||
@@ -38,0 +38,0 @@ })); |
@@ -36,5 +36,5 @@ /** | ||
virtualizer.setOptions(_rollupPluginBabelHelpers["extends"]({}, options, { | ||
onChange: function onChange(instance) { | ||
onChange: function onChange(instance, sync) { | ||
vue.triggerRef(state); | ||
options.onChange == null ? void 0 : options.onChange(instance); | ||
options.onChange == null ? void 0 : options.onChange(instance, sync); | ||
} | ||
@@ -41,0 +41,0 @@ })); |
@@ -49,5 +49,5 @@ /** | ||
virtualizer.setOptions(_extends({}, options, { | ||
onChange: function onChange(instance) { | ||
onChange: function onChange(instance, sync) { | ||
vue.triggerRef(state); | ||
options.onChange == null ? void 0 : options.onChange(instance); | ||
options.onChange == null ? void 0 : options.onChange(instance, sync); | ||
} | ||
@@ -54,0 +54,0 @@ })); |
@@ -11,3 +11,3 @@ /** | ||
*/ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@tanstack/virtual-core"),require("vue")):"function"==typeof define&&define.amd?define(["exports","@tanstack/virtual-core","vue"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).VueVirtual={},e.VirtualCore,e.Vue)}(this,(function(e,n,t){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},r.apply(this,arguments)}function o(e){var o=new n.Virtualizer(t.unref(e)),i=t.shallowRef(o),u=o._didMount();return t.watch((function(){return t.unref(e).getScrollElement()}),(function(e){e&&o._willUpdate()}),{immediate:!0}),t.watch((function(){return t.unref(e)}),(function(e){o.setOptions(r({},e,{onChange:function(n){t.triggerRef(i),null==e.onChange||e.onChange(n)}})),o._willUpdate(),t.triggerRef(i)}),{immediate:!0}),t.onScopeDispose(u),i}e.useVirtualizer=function(e){return o(t.computed((function(){return r({observeElementRect:n.observeElementRect,observeElementOffset:n.observeElementOffset,scrollToFn:n.elementScroll},t.unref(e))})))},e.useWindowVirtualizer=function(e){return o(t.computed((function(){return r({getScrollElement:function(){return"undefined"!=typeof document?window:null},observeElementRect:n.observeWindowRect,observeElementOffset:n.observeWindowOffset,scrollToFn:n.windowScroll,initialOffset:"undefined"!=typeof document?window.scrollY:void 0},t.unref(e))})))},Object.keys(n).forEach((function(t){"default"===t||e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})})),Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@tanstack/virtual-core"),require("vue")):"function"==typeof define&&define.amd?define(["exports","@tanstack/virtual-core","vue"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).VueVirtual={},e.VirtualCore,e.Vue)}(this,(function(e,n,t){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},r.apply(this,arguments)}function o(e){var o=new n.Virtualizer(t.unref(e)),i=t.shallowRef(o),u=o._didMount();return t.watch((function(){return t.unref(e).getScrollElement()}),(function(e){e&&o._willUpdate()}),{immediate:!0}),t.watch((function(){return t.unref(e)}),(function(e){o.setOptions(r({},e,{onChange:function(n,r){t.triggerRef(i),null==e.onChange||e.onChange(n,r)}})),o._willUpdate(),t.triggerRef(i)}),{immediate:!0}),t.onScopeDispose(u),i}e.useVirtualizer=function(e){return o(t.computed((function(){return r({observeElementRect:n.observeElementRect,observeElementOffset:n.observeElementOffset,scrollToFn:n.elementScroll},t.unref(e))})))},e.useWindowVirtualizer=function(e){return o(t.computed((function(){return r({getScrollElement:function(){return"undefined"!=typeof document?window:null},observeElementRect:n.observeWindowRect,observeElementOffset:n.observeWindowOffset,scrollToFn:n.windowScroll,initialOffset:"undefined"!=typeof document?window.scrollY:void 0},t.unref(e))})))},Object.keys(n).forEach((function(t){"default"===t||e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})})),Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.production.js.map |
{ | ||
"name": "@tanstack/vue-virtual", | ||
"author": "Tanner Linsley", | ||
"version": "3.0.0-beta.65", | ||
"version": "3.0.0-beta.66", | ||
"description": "Headless UI for virtualizing scrollable elements in Vue", | ||
@@ -49,3 +49,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"@tanstack/virtual-core": "3.0.0-beta.65" | ||
"@tanstack/virtual-core": "3.0.0-beta.66" | ||
}, | ||
@@ -52,0 +52,0 @@ "peerDependencies": { |
@@ -53,5 +53,5 @@ import { | ||
...options, | ||
onChange: (instance) => { | ||
onChange: (instance, sync) => { | ||
triggerRef(state) | ||
options.onChange?.(instance) | ||
options.onChange?.(instance, sync) | ||
}, | ||
@@ -58,0 +58,0 @@ }) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
44197
+ Added@tanstack/virtual-core@3.0.0-beta.66(transitive)
- Removed@tanstack/virtual-core@3.0.0-beta.65(transitive)