This question is locked. New answers and comments are not allowed.
Hello,
I've ran into a problem where when updating the list with search queries, the list items become invisible. It works in iOS, the problem only occurs in android.
Here is a video showing the problem: Video
If I remove the line <ListViewStaggeredLayout tkListViewLayout spanCount="1"></ListViewStaggeredLayout> from the code, it works fine, but is there any way I can use staggeredlayout with this setup? I have no idea why it isn't working properly.
.html
<GridLayout rows="*"> <RadListView #radListView scrollPosition="Top" backgroundColor="transparent" (itemLoading)="onItemLoading($event)" #contactsView [items]="filteredItems"> <ListViewStaggeredLayout tkListViewLayout spanCount="1"></ListViewStaggeredLayout> <ng-template tkListItemTemplate let-item="item" let-index="index"> <StackLayout class="item" [class.first]="index === 0" (tap)="itemTapped(item)"> <ink-list-user *ngIf="showContacts" [user]="item"></ink-list-user> <ink-list-event *ngIf="showEvents" [event]="item"></ink-list-event> <ink-list-connection *ngIf="showConnections" [connection]="item" [selected]="selected.indexOf(item) > -1"></ink-list-connection> </StackLayout> </ng-template> </RadListView></GridLayout>
in .component.ts
filteredItems: any[] = []; onItemLoading(args) { if (isIOS) { let color = new Color(0, 255, 0, 0); args.ios.backgroundView.backgroundColor = color.ios; } } onSearchChanged(query: string) { //called when text on textfield changes if (query.length) { this.localContactsService.filterContacts(query).subscribe( res => this.filteredItems = res.items, err => this._loadingError(err) ); } else { this.filteredItems = []; } }