Fix scrollToIndex

This commit is contained in:
wvffle 2022-07-24 22:38:34 +00:00 committed by Georg Krause
parent 11b67919c8
commit 2117b0e209
2 changed files with 6 additions and 1 deletions

View File

@ -383,6 +383,7 @@ const reorderTracks = async (from: number, to: number) => {
</h2>
</div>
<virtual-list
ref="list"
:list="queueItems"
:component="QueueItem"
:size="50"

View File

@ -162,7 +162,9 @@ const { resume, pause } = useRafFn(() => {
lastDate = now
}, { immediate: false })
const virtualList = ref()
defineExpose({
scrollToIndex: (index: number) => virtualList.value?.scrollToIndex(index),
cleanup
})
</script>
@ -175,7 +177,9 @@ export default {
<template>
<div>
<virtual-list
<component
:is="VirtualList"
ref="virtualList"
class="virtual-list"
wrap-class="drag-container"
item-class="drag-item"