Skip to content

Commit 35d875e

Browse files
authored
Merge pull request #71 from MrSnoozles/patch-vue3-global-properties-unavailble
Fix: Vue3 global properties not available in slot
2 parents e308dda + 30e58de commit 35d875e

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
@@ -74,8 +74,9 @@ export const CollectionView = defineComponent({
7474
function onItemLoading(event: any & ItemEventData) {
7575
const index = event.index;
7676
const id = event.view?.[LIST_CELL_ID] ?? `${cellId++}`;
77+
const item = defineComponent(event.bindingContext, vm);
7778

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

8182
// update the cell data with the current row

0 commit comments

Comments
 (0)