vue-virtual-scroller icon indicating copy to clipboard operation
vue-virtual-scroller copied to clipboard

Dynamic scroller not handling correct position

Open zsqio opened this issue 2 years ago • 3 comments
trafficstars

Describe the bug

elements are shown and overlap other items

Reproduction

<template>
    <div>
        <DynamicScroller
            ref="chatScroll"
            :items="chatMsgList"
            class="chat-scroller"
            :min-item-size="50"
            @resize="scrollToEnd"
            @scroll.native.passive="handleScroll"
        >
            <template v-slot="{item, index, active}">
                <DynamicScrollerItem
                    :item="item"
                    :data-index="index"
                    :active="active"
                    :data-active="active"
                >
                    <div class="message-item" v-html="item.content"></div>
                </DynamicScrollerItem>
            </template>
         </DynamicScroller>
    </div>
</template>
<script>
export default {
    computed: {
        chatMsgList() {
            let list = this.$store.state.chat.chatMsgList;
            if (list.length > 200) {
                const num = list.length - 200;
                list.splice(0, num);
            }
            list = list.map((item, index) => {
                return {
                    id: index++,
                    content: item
                };
            });
            return list;
        }
    }
}
</script>

System Info

"vue": "^2.5.17",
"vue-virtual-scroller": "^1.1.2",

Used Package Manager

npm

Validations

zsqio avatar Feb 14 '23 10:02 zsqio

I'm having the same issue. It's sad that the best lib for vue virtual scrolling is abandoned xD

mateusmsant avatar Apr 15 '23 12:04 mateusmsant

Yeah... Tried adding a Popover inside and it broke down: image

varna avatar Apr 18 '23 12:04 varna

Complain to the Vue team?

lizyChy0329 avatar Mar 28 '24 07:03 lizyChy0329