RadListView Items Unloading

Thread is closed for posting
2 posts, 0 answers
  1. Ericky
    Ericky avatar
    49 posts
    Member since:
    Jun 2017

    Posted 31 Jul 2017 Link to this post

    Hello,

     

    Is there any way to stop the items from unloading when you scroll down?

     

    The reason for this is that I am generating custom dynamic components such as <card [card]="item"></card>. And when the item reloads, the components loses its current state and starts back anew.

     

    Thank you.

  2. Deyan
    Admin
    Deyan avatar
    2147 posts

    Posted 01 Aug 2017 Link to this post

    Hi,

    The List component recycles the Views that are used to visualise your data items. In other words, when a specific item view goes out of the screen it is detached from its data item and used to visualise another data item that is to be displayed in the viewport of the list. This behaviour is implemented at the core of the component and cannot be stopped.

    In such situations the expected approach is to bind all state-related properties in your Item Template to properties on your data item. This will automatically preserve the state of your visual items when they are automatically assigned to a corresponding data item.

    I hope this helps. 

    Regards,
    Deyan
    Progress Telerik
    Did you know that you can open private support tickets which are reviewed and answered within 24h by the same team who built the components? This is available in our UI for NativeScript Pro + Support offering.
Back to Top