8000 fix: fix list view template selector getting the wrong item · vue-spain/nativescript-vue@d648a57 · GitHub
[go: up one dir, main page]

Skip to content

Commit d648a57

Browse files
committed
fix: fix list view template selector getting the wrong item
1 parent 077f512 commit d648a57

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

platform/nativescript/runtime/components/list-view.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export default {
8282
? items.getItem(index)
8383
: items[index]
8484

85-
const name = args.object._itemTemplateSelector(context, index, items)
85+
const name = args.object._itemTemplateSelector(currentItem, index, items)
8686
const context = this.getItemContext(currentItem, index)
8787
const oldVnode = args.view && args.view[VUE_VIEW]
8888

samples/app/app-with-list-view.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ new Vue({
4545
4646
<v-template if="item.type === 'page'">
4747
<WrapLayout orientation="horizontal" class="list-group-item active">
48-
<Label :text="'>>>>>>>' + item.title" style="color: red;" />
48+
<Label :text="item.title" style="color: red;" />
4949
</WrapLayout>
5050
</v-template>
5151

0 commit comments

Comments
 (0)
0