Skip to content

Commit 09070ab

Browse files
committed
fix: Infinite loop on scrollToIndex with vue3 component;
1 parent 70eec58 commit 09070ab

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/collectionview/vue3/component.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,14 @@ export const CollectionView = defineComponent({
121121
return vnode;
122122
});
123123

124-
function scrollToIndex(index: number, animate = false) {
125-
(collectionView.value.nativeView as NSCollectionView).scrollToIndex(index, animate);
126-
}
127-
128124
return () =>
129125
h(
130126
'NativeCollectionView',
131127
{
132128
ref: collectionView,
133129
items: props.items,
134130
itemTemplates,
135-
onItemLoading,
136-
scrollToIndex
131+
onItemLoading
137132
},
138133
cellVNODES()
139134
);

0 commit comments

Comments
 (0)