Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix listview cell recycling #572

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

Merged

Conversation

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.

prawnsalad, rigor789, and romandrahan reacted with hooray emoji
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
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.

Copy link

Is this fix released?

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

topclaudy and romandrahan reacted with thumbs up emoji

Copy link

romandrahan commented Oct 28, 2020
edited
Loading

@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
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

<ListView> is very slow comparing to NS Core

AltStyle によって変換されたページ (->オリジナル) /