8000 feat(list-view): Add support for default ListView item template (#438) · wenguang/nativescript-vue@748d39a · GitHub
[go: up one dir, main page]

Skip to content

Commit 748d39a

Browse files
VladimirAmiorkovrigor789
authored andcommitted
feat(list-view): Add support for default ListView item template (nativescript-vue#438)
* feat(list-view): Add support for default ListView item template * feat(list-view): Add support for default ListView item template
1 parent 38c468d commit 748d39a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ export default {
5050
},
5151

5252
mounted() {
53+
if (!this.$templates) {
54+
return;
55+
}
56+
5357
this.$refs.listView.setAttribute(
5458
'_itemTemplatesInternal',
5559
this.$templates.getKeyedTemplates()
@@ -64,6 +68,10 @@ export default {
6468
this.$emit('itemTap', extend({ item: this.items[args.index] }, args))
6569
},
6670
onItemLoading(args) {
71+
if (!this.$templates) {
72+
return;
73+
}
74+
6775
const index = args.index
6876
const items = args.object.items
6977

0 commit comments

Comments
 (0)
0