Yes
I use RadListView with a custom component (ProductComponent) inside ng-template. When I press the (+) button inside ProductComponent its increase a "cant:number" variable, and the html template should change (using _[visibility]=" cant > 0 ? 'visible' : 'collapsed' "_), but nothing happens... only when I scrolling down RadListView and scrolling up again seems re-render ProductComponent and its works.
Any idea?
Gif showing the weird behavior:

Only iOS, Android works. Tested on iOS Simulator and iPhone6s (iOS 10.3.2)
catalog.component.ts
<StackLayout>
<Label text="Menu"></Label>
<GridLayout height="100%">
<RadListView [items]="dataItems">
<ng-template tkListItemTemplate let-item="item">
<StackLayout class="m-2">
<product [product]="item" (add)="addItem($event)"></product>
</StackLayout>
</ng-template>
<ListViewGridLayout tkListViewLayout scrollDirection="Vertical" ios:itemHeight="180" spanCount="2"></ListViewGridLayout>
</RadListView>
</GridLayout>
</StackLayout>
product.component.ts
export class ProductComponent {
@Input() product: Product;
cant: number = 0;
add() {
this.cant++;
}
remove() {
this.cant--;
}
}
I also tried with
ngZone.run(()=>{
this.cant++;
})
product.component.html
<AbsoluteLayout>
<product-ui [src]="product"></product-ui>
<Button text="âž•" (tap)="add(product)"></Button>
<Button text="âž–" (tap)="remove()" [visibility]=" cant > 0 ? 'visible' : 'collapsed' "></Button>
<Button [text]="cant" [visibility]=" cant > 0 ? 'visible' : 'collapsed' "></Button>
</AbsoluteLayout>
THANKS !
Happens to us as well, following
HI @MentalRender,
Can you provide sample project, which can be used for reproducing the case and shows, how are the data used in the ListView is structured?
Also, this case demonstrated on the GIF file seems to be expected for iOS. When you need to show and hide component dynamically for iOS, you should also refresh the ListView. This will reload the items, and the UI will be updated.
@tsonevn I think refresh does solve it, however, it also reloads the list as you said and scrolls it back to the top. This refresh and then resetting the previous scroll position both provide the user with a bad user experience. Can you please comment on this? Is there a way to just "update the bindings" without reload the whole list?
In our case we are binding the visibility property as well (on a label, not a button) and experience the same issue on iOS only.
Thanks for reply @tsonevn. Sure!
Hopefully, I provide you a simple project ready in a few hours (my real project is too big)
@tsonevn, I upload this repo.
Just for help you, my questions are:
I think second question is about new ObservableArray... but Im not sure
Sorry for my english...
Hi @MentalRender @tigrenok00,
I tested the sample project on my side and was able to recreate the issue. I will mark this as a bug. For now, I would suggest keeping track of the problem.
Most helpful comment
Hi @MentalRender @tigrenok00,
I tested the sample project on my side and was able to recreate the issue. I will mark this as a bug. For now, I would suggest keeping track of the problem.