pull/7024/head
Adam Koller 2024-12-29 12:02:54 +01:00
parent 2ebda30c10
commit 1009a8ed2a
1 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,6 @@
<template> <template>
<template v-if="!disabled"> <template v-if="!disabled"
><Button @click="items.push('Item #' + items.length)" label="Add" /><Button @click="scrollToIndex(items.length)" label="Scroll" />
<div :ref="elementRef" :class="containerClass" :tabindex="tabindex" :style="style" @scroll="onScroll" v-bind="ptmi('root')"> <div :ref="elementRef" :class="containerClass" :tabindex="tabindex" :style="style" @scroll="onScroll" v-bind="ptmi('root')">
<slot <slot
name="content" name="content"
@ -91,11 +92,12 @@ export default {
this.d_loading = newValue; this.d_loading = newValue;
} }
}, },
items(newValue, oldValue) { items: {
if (!oldValue || oldValue.length !== (newValue || []).length) { handler(newValue) {
this.init(); this.init();
this.calculateAutoSize(); this.calculateAutoSize();
} },
deep: true
}, },
itemSize() { itemSize() {
this.init(); this.init();