Skip to content
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

Fix listview cell recycling #572

Merged

Conversation

tralves
Copy link

@tralves tralves commented Nov 5, 2019

Fixes #565.

The <NativeListView> was not setting the itemTemplates property correctly.

I am not sure why it was setting _itemTemplatesInternal instead of itemTemplates before, but now it works. According to my tests, the cell recycling works properly with multi-templates and the scroll is visibly smoother.

For comparison of a before/after, see the updated playground app. The list on the right is patched with this fix.

@tralves
Copy link
Author

tralves commented Nov 5, 2019

On the same note, should we change _itemTemplateSelector to itemTemplateSelector?

PRed...

@rigor789 rigor789 merged commit 7a220c9 into nativescript-vue:master Nov 5, 2019
@rigor789
Copy link
Member

rigor789 commented Nov 5, 2019

I can't recall the exact reason we had to use _itemTemplatesInternal - but I do remember having issues with just itemTemplates when I implemented the ListView. It has likely been fixed in ns core since then.

@topclaudy
Copy link

Is this fix released?

@rigor789
Copy link
Member

rigor789 commented Jan 1, 2020

@topclaudy yes in an alpha release (it is safe to upgrade - I have been using the latest alpha for a while) https://github.com/nativescript-vue/nativescript-vue/releases/tag/v2.5.0-alpha.2

@romandrahan
Copy link

romandrahan commented Oct 28, 2020

@rigor789, maybe related to this one and to #245.

For us the app is randomly crashing on iOS after showing this in console for ListView component:

[Vue warn]: Error in v-on handler: "TypeError: args.object._itemTemplateSelector is not a function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

<ListView> is very slow comparing to NS Core
4 participants