RadListView error


#1

I’m trying to use the RadListView. I’m getting lots of errors, however it is displaying. I’m binding to an ObservableArry and the item gets populated but generates this:

CONSOLE ERROR [native code]:  ERROR  ERROR TypeError: undefined is not an object (evaluating '_v.context.item.title')
CONSOLE ERROR [native code]:  ERROR  ERROR CONTEXT {
"view": {
"def": {
"nodeFlags": 3,
"rootNodeFlags": 3,
"nodeMatchedQueries": 0,
"flags": 0,
"nodes": [
{
"nodeIndex": 0,
"parent": null,
"renderParent": null,
"bindingIndex": 0,
"outputIndex": 0,
"checkIndex": -1,
"flags": 2,
"childFlags": 0,
"directChildFlags": 0,
"childMatchedQueries": 0,
"matchedQueries": {},
"matchedQueryIds": 0,
"references": {},
"ngContentIndex": null,
"childCount": 0,
"bindings": [],
"bindingFlags": 8,
"outputs": [],
"element": null,
"provider": null,
"text": {
"prefix": "\n\t\t\t\t\t"
},
"query": null,
"ngContent": null
},
{
"nodeIndex": 1,
"parent": null,
"renderParent": null,

My array looks like this:

``
[{
“term”: “Does not change color when heated.”,
“CategoryId”: “342”
}, {
“term”: “Subject to burnthrough and warpage.”,
“CategoryId”: “342”
}, {
“term”: “Highest electrical conductivity of all metals.”,
“CategoryId”: “343”
}, {
“term”: “Alloyed to make bronze and brass.”,
“CategoryId”: “343”
}, {
“term”: “Does not flow when melted.”,
“CategoryId”: “344”
}, {
“term”: “Does not require special welding procedures.”,
“CategoryId”: “344”
}, {
“term”: “A reactive metal.”,
“CategoryId”: “345”
}, {
“term”: “Quality of weld is judged by color.”,
“CategoryId”: “345”
}]
`’

My binding is Angular and this is what the template looks like:

<GridLayout *ngIf="!isTablet" rows="30,*">
		<GridLayout row="1">
			<RadListView [items]="dataItems">
				<ng-template tkListItemTemplate tkTemplateKey="category" let-item="item">
					<GridLayout columns="*" orientation="vertical">
						<StackLayout>
							<Label class="titleLabel" [text]="item.title" data-id="item.id"></Label>
						</StackLayout>
					</GridLayout>
				</ng-template>
			</RadListView>
		</GridLayout>

#2

Exactly the same error I hit few mins ago during an app upgrade :crazy_face:

After hours it hit my mind to check the existing issues in repo and it seems like a bug in the latest release. Try updating the version of nativescript-ui-listview in your package.json to 3.5.9, make sure you remove the carat before version.