Skip to content

Commit 8445ac1

Browse files
committed
- improve item height measurer - it wasn't counting height well in some edge cases
1 parent f2a2282 commit 8445ac1

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-windowing",
3-
"version": "0.6.0",
3+
"version": "0.6.1",
44
"description": "Set of components used for virtualizing DOM",
55
"main": "dist/vue-windowing.ssr.js",
66
"browser": "dist/vue-windowing.esm.js",

src/components/AutoHeightMeasurer.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,18 @@ export default {
2323
default: 0,
2424
},
2525
},
26+
updated() {
27+
if (this.$el) {
28+
this.onHeightChange(this.$el.offsetHeight);
29+
}
30+
},
2631
methods: {
2732
onResize(entry) {
2833
const { height } = entry.contentRect;
2934
35+
this.onHeightChange(height);
36+
},
37+
onHeightChange(height) {
3038
if (height !== this.height && height !== 0) {
3139
this.$emit('height', {
3240
index: this.index,

0 commit comments

Comments
 (0)