Skip to content

Commit ed5234f

Browse files
committed
Version bump
1 parent 2a01a8f commit ed5234f

File tree

5 files changed

+33
-21
lines changed

5 files changed

+33
-21
lines changed

dist/vue-virtual-scroller.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue-virtual-scroller.esm.js

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ var VirtualScroller = { render: function render() {
340340
}) : [_vm._l(_vm.visibleItems, function (item, index) {
341341
return _vm._t("default", null, { item: item, itemIndex: _vm._startIndex + index, itemKey: _vm.keysEnabled && item[_vm.keyField] || undefined });
342342
})]], 2), _vm._v(" "), _vm._t("after-content")], 2), _vm._v(" "), _vm._t("after-container"), _vm._v(" "), _c('resize-observer', { on: { "notify": _vm.handleResize } })], 2);
343-
}, staticRenderFns: [], _scopeId: 'data-v-727d6836',
343+
}, staticRenderFns: [], _scopeId: 'data-v-2b1f2e05',
344344
name: 'virtual-scroller',
345345

346346
mixins: [Scroller],
@@ -593,10 +593,10 @@ var uid = 0;
593593
var RecycleList = { render: function render() {
594594
var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { directives: [{ name: "observe-visibility", rawName: "v-observe-visibility", value: _vm.handleVisibilityChange, expression: "handleVisibilityChange" }], staticClass: "recycle-list", class: _vm.cssClass, on: { "&scroll": function scroll($event) {
595595
_vm.handleScroll($event);
596-
} } }, [_c('div', { staticClass: "item-wrapper", style: 'height:' + _vm.totalHeight + 'px' }, _vm._l(_vm.pool, function (view) {
597-
return _c('div', { key: view.nr.id, staticClass: "item-view", style: 'transform:translateY(' + view.top + 'px)' }, [_vm._t("default", null, { item: view.item })], 2);
596+
} } }, [_c('div', { staticClass: "item-wrapper", style: { height: _vm.totalHeight + 'px' } }, _vm._l(_vm.pool, function (view) {
597+
return _c('div', { key: view.nr.id, staticClass: "item-view", style: { transform: 'translateY(' + view.top + 'px)' } }, [_vm._t("default", null, { item: view.item })], 2);
598598
})), _vm._v(" "), _c('resize-observer', { on: { "notify": _vm.handleResize } })], 1);
599-
}, staticRenderFns: [], _scopeId: 'data-v-68940351',
599+
}, staticRenderFns: [], _scopeId: 'data-v-2277f571',
600600
name: 'RecycleList',
601601

602602
mixins: [Scroller],
@@ -812,8 +812,8 @@ var RecycleList = { render: function render() {
812812

813813
if (this.$_continuous !== continuous) {
814814
if (continuous) {
815-
this.$_views.clear();
816-
this.$_unusedViews.clear();
815+
views.clear();
816+
unusedViews.clear();
817817
for (var _i = 0, l = pool.length; _i < l; _i++) {
818818
view = pool[_i];
819819
this.unuseView(view);
@@ -823,8 +823,14 @@ var RecycleList = { render: function render() {
823823
} else if (continuous) {
824824
for (var _i2 = 0, _l = pool.length; _i2 < _l; _i2++) {
825825
view = pool[_i2];
826-
if (view.nr.used && (view.nr.index < startIndex || view.nr.index > endIndex || checkItem && !items.includes(view.item))) {
827-
this.unuseView(view);
826+
if (view.nr.used) {
827+
// Update view item index
828+
if (checkItem) view.nr.index = items.indexOf(view.item);
829+
830+
// Check if index is still in visible range
831+
if (view.nr.index === -1 || view.nr.index < startIndex || view.nr.index > endIndex) {
832+
this.unuseView(view);
833+
}
828834
}
829835
}
830836
}
@@ -906,7 +912,7 @@ function registerComponents(Vue, prefix) {
906912

907913
var plugin$4 = {
908914
// eslint-disable-next-line no-undef
909-
version: "0.11.0",
915+
version: "0.11.1",
910916
install: function install(Vue, options) {
911917
var finalOptions = Object.assign({}, {
912918
installComponents: true,

dist/vue-virtual-scroller.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue-virtual-scroller.umd.js

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ var VirtualScroller = { render: function render() {
344344
}) : [_vm._l(_vm.visibleItems, function (item, index) {
345345
return _vm._t("default", null, { item: item, itemIndex: _vm._startIndex + index, itemKey: _vm.keysEnabled && item[_vm.keyField] || undefined });
346346
})]], 2), _vm._v(" "), _vm._t("after-content")], 2), _vm._v(" "), _vm._t("after-container"), _vm._v(" "), _c('resize-observer', { on: { "notify": _vm.handleResize } })], 2);
347-
}, staticRenderFns: [], _scopeId: 'data-v-727d6836',
347+
}, staticRenderFns: [], _scopeId: 'data-v-2b1f2e05',
348348
name: 'virtual-scroller',
349349

350350
mixins: [Scroller],
@@ -597,10 +597,10 @@ var uid = 0;
597597
var RecycleList = { render: function render() {
598598
var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { directives: [{ name: "observe-visibility", rawName: "v-observe-visibility", value: _vm.handleVisibilityChange, expression: "handleVisibilityChange" }], staticClass: "recycle-list", class: _vm.cssClass, on: { "&scroll": function scroll($event) {
599599
_vm.handleScroll($event);
600-
} } }, [_c('div', { staticClass: "item-wrapper", style: 'height:' + _vm.totalHeight + 'px' }, _vm._l(_vm.pool, function (view) {
601-
return _c('div', { key: view.nr.id, staticClass: "item-view", style: 'transform:translateY(' + view.top + 'px)' }, [_vm._t("default", null, { item: view.item })], 2);
600+
} } }, [_c('div', { staticClass: "item-wrapper", style: { height: _vm.totalHeight + 'px' } }, _vm._l(_vm.pool, function (view) {
601+
return _c('div', { key: view.nr.id, staticClass: "item-view", style: { transform: 'translateY(' + view.top + 'px)' } }, [_vm._t("default", null, { item: view.item })], 2);
602602
})), _vm._v(" "), _c('resize-observer', { on: { "notify": _vm.handleResize } })], 1);
603-
}, staticRenderFns: [], _scopeId: 'data-v-68940351',
603+
}, staticRenderFns: [], _scopeId: 'data-v-2277f571',
604604
name: 'RecycleList',
605605

606606
mixins: [Scroller],
@@ -816,8 +816,8 @@ var RecycleList = { render: function render() {
816816

817817
if (this.$_continuous !== continuous) {
818818
if (continuous) {
819-
this.$_views.clear();
820-
this.$_unusedViews.clear();
819+
views.clear();
820+
unusedViews.clear();
821821
for (var _i = 0, l = pool.length; _i < l; _i++) {
822822
view = pool[_i];
823823
this.unuseView(view);
@@ -827,8 +827,14 @@ var RecycleList = { render: function render() {
827827
} else if (continuous) {
828828
for (var _i2 = 0, _l = pool.length; _i2 < _l; _i2++) {
829829
view = pool[_i2];
830-
if (view.nr.used && (view.nr.index < startIndex || view.nr.index > endIndex || checkItem && !items.includes(view.item))) {
831-
this.unuseView(view);
830+
if (view.nr.used) {
831+
// Update view item index
832+
if (checkItem) view.nr.index = items.indexOf(view.item);
833+
834+
// Check if index is still in visible range
835+
if (view.nr.index === -1 || view.nr.index < startIndex || view.nr.index > endIndex) {
836+
this.unuseView(view);
837+
}
832838
}
833839
}
834840
}
@@ -910,7 +916,7 @@ function registerComponents(Vue, prefix) {
910916

911917
var plugin$4 = {
912918
// eslint-disable-next-line no-undef
913-
version: "0.11.0",
919+
version: "0.11.1",
914920
install: function install(Vue, options) {
915921
var finalOptions = Object.assign({}, {
916922
installComponents: true,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-virtual-scroller",
33
"description": "Smooth scrolling for any amount of data",
4-
"version": "0.11.0",
4+
"version": "0.11.1",
55
"author": {
66
"name": "Guillaume Chau",
77
"email": "[email protected]"

0 commit comments

Comments
 (0)