Skip to content

Commit 30e58de

Browse files
authored
Fix: Vue global properties not available in slot
1 parent 09070ab commit 30e58de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/collectionview/vue3/component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ export const CollectionView = defineComponent({
7373
function onItemLoading(event: any & ItemEventData) {
7474
const index = event.index;
7575
const id = event.view?.[LIST_CELL_ID] ?? `${cellId++}`;
76+
const item = defineComponent(event.bindingContext, vm);
7677

77-
const itemCtx = getItemCtx(event.bindingContext, index, props.alias, props.itemIdGenerator);
78+
const itemCtx = getItemCtx(item, index, props.alias, props.itemIdGenerator);
7879
// const itemCtx: ListItem = getItemCtx(props.items instanceof ObservableArray ? props.items.getItem(index) : props.items[index], index, props.alias, props.itemIdGenerator);
7980

8081
// update the cell data with the current row

0 commit comments

Comments
 (0)