glimmer-native icon indicating copy to clipboard operation
glimmer-native copied to clipboard

RadListView item template nodes duplicated when rendering null values

Open billdami opened this issue 5 years ago • 0 comments

In a simple vertical linear list view layout, it appears that the item templates for a RadListView will incorrectly render duplicate values/view nodes across multiple items in the list, if the node is given a null value.

For example, if the item template contains the following:

<Label text={{@item.name}}  />

Where some of the members in the backing data list contain null for @item.name, those particular items are rendering a non-null value from another member in the list. This seems to happen due to that <Label> node being recycled incorrectly.

However, if you modify the template to the following:

<Label text={{if @item.name @item.name ""}}  />

So that null/empty values instead pass an empty string to the <Label>, the issue does not occur.

billdami avatar Oct 10 '19 11:10 billdami