Skip to content

Using nativescript plugin - RadListView #245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
odai-alali opened this issue Jun 8, 2018 · 3 comments
Closed

Using nativescript plugin - RadListView #245

odai-alali opened this issue Jun 8, 2018 · 3 comments

Comments

@odai-alali
Copy link

Version

1.4.0-alpha.0

Reproduction link

https://play.nativescript.org/?template=play-vue&id=hJoMa0&v=3

Platform and OS info

Android 7.1.1 / NativeScript 4.0 / Windows 10

Steps to reproduce

npm install nativescript-ui-listview
// main.js
Vue.registerElement("RadListView", () => require("nativescript-ui-listview").RadListView);

Using RadListView component with v-view directive throws an exception

What is expected?

render a list of items

What is actually happening?

exception is thrown

@rigor789
Copy link
Member

The RadListView needs a Vue component in order to work, v-view will not work when setting the itemTemplate, because it sets the actual view as the property, and doesn't create a reusable template that the RadListView requires.

Here is a playground of a working RadListView - note this doesn't implement all features of RadListView, and will eventually be included in the official plugin, but for now you can get up and running like so: https://play.nativescript.org/?template=play-vue&id=i28vZu&v=4

@fabfischer
Copy link

@rigor789 Thanks for your example, works great for ListViewGridLayout.
Do you have a working example for "ListViewLinearLayout" ? I tried your code but it seems that the method "onItemLoading" needs some changes for this layout type?
I get the following error message:
JS ERROR TypeError: args.object._itemTemplateSelector is not a function. (In 'args.object._itemTemplateSelector(currentItem, index, items)', 'args.object._itemTemplateSelector' is undefined)

Thanks in advance!

@nativescript-vue-bot
Copy link
Collaborator

We are locking this issue because it has been closed for more than 14 days.

If the issue comes up again please open a new issue with additional details.

@nativescript-vue nativescript-vue locked as resolved and limited conversation to collaborators Jul 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

4 participants