These are chat archives for jgamedev/nativescript

7th
Jun 2017
Carlos Esteban Lopez Jaramillo
@luchillo17
Jun 07 2017 03:30
Guys i have some tables in web that have hidden items in between them, on click i show and expand such table item to show the details, is there a way to reproduce such in NativeScript?
Fannar M. Sigurðsson
@fannarx
Jun 07 2017 14:27
Hi, Quick question, what is the best way to filter a large list and how should you select the value from the list ?
I tried using ListView with a ng-template and (itemTap)="$event" and selecting the index from the event. But that is always the filtered list so the index dose not match the index in the "whole"array

Code -
Html
<GridLayout>
<ListView [items]="custList | customerSearch:searchParams" (itemTap)="selectCustomer($event)" >
<ng-template let-item="item" >
<Label [text]="item.name"></Label>
</ng-template>
</ListView>
</GridLayout>

TS.
selectCustomer(args){
console.log(args.index);
console.log(this.custList[args.index].name);
}

Fannar M. Sigurðsson
@fannarx
Jun 07 2017 14:46
@ucha19871 ; I see this user is asking about the same thing, did you ever find a solution ?
Fannar M. Sigurðsson
@fannarx
Jun 07 2017 14:57
Well, went around the problem, just put a (tap) on the label. But than we loose the "tap" animation.. guess ill just ... not odc' over it =)
Andrew Yip
@yipcma
Jun 07 2017 19:44
am here purely for nativescript-vue. Is it discussed here as well?