This is a migrated thread and some comments may be shown as answers.

RadListView Items Unloading

1 Answer 29 Views
ListView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ericky
Top achievements
Rank 1
Ericky asked on 01 Aug 2017, 03:08 AM

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.

1 Answer, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 01 Aug 2017, 07:54 AM
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.
Tags
ListView
Asked by
Ericky
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Share this question
or