Skip to content

RadListView not recycling items if they are custom components #1317

Open
@RomanYopapp

Description

@RomanYopapp

Environment

  • CLI: 8.3.20
  • NativeScript-Angular:8.0.1
  • Angular:8.2.14

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>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions