ProgressNS / nativescript-ui-feedback

This repository is used for customer feedback regarding Telerik UI for NativeScript. The issues system here is used by customers who want to submit their feature requests or vote for existing ones.
Other
115 stars 21 forks source link

RadListView not recycling items if they are custom components #1317

Open RomanYopapp opened 4 years ago

RomanYopapp commented 4 years ago

Environment

Describe the bug The problem I have is that the RadListView is not recycling cells well when the data defined is a child component. The same items are repeated instead of recycling them and adding the new values

HTML

  <FlexboxLayout flexDirection="column">
      <StackLayout orientation="vertical" tkExampleTitle tkToggleNavButton padding="0 11">
        <RadListView [items]="items" pullToRefresh="true" (pullToRefreshInitiated)="onPullToRefreshInitiated($event)"
          loadOnDemandMode="Auto" (loadMoreDataRequested)="onLoadMoreItemsRequested($event)"
          [height]="headers.total*320">
          <ng-template tkListItemTemplate let-item="item">
            <FlexboxLayout flexDirection="row" margin="5">
              <app-item [item]="item" [releated_products]="false"></app-item>
            </FlexboxLayout>
          </ng-template>
          <ListViewGridLayout tkListViewLayout scrollDirection="Vertical" itemHeight="320" spanCount="2">
          </ListViewGridLayout>
        </RadListView>
      </StackLayout>
    </FlexboxLayout>
NickIliev commented 4 years ago

@RomanYopapp if possible please provide a Playground demo.

RomanYopapp commented 4 years ago

Here is a video that shows how the same items are repeated, I hope it helps you. It shows a total of 34 items which is what the api returns to me. See that the item with the name "Powerade Mi primer" is repeated more than once. video.mov.zip