nativescript-carousel
nativescript-carousel copied to clipboard
[iOS] ListView inside CarouselItem not tapable
If you include a ListView into a static <CarouselItem>, the itemTap event does not get fired.
XML:
<ns:Carousel row="3" selectedPage="{{ selectedTab }}" finite="true" bounce="true">
<ns:CarouselItem>
<ListView items="{{ items }}" height="100%" itemTap="onListItemTap">
<ListView.itemTemplate>
<Label text="{{ $value }}"/>
</ListView.itemTemplate>
</ListView>
</ns:CarouselItem>
</ns:Carousel>
Code Behind:
export function onListItemTap(args: ItemEventData) {
console.log('clicked');
}
I also noticed a strange behavior:
If you only have one <CarouselItem> and you hold your finger on the table row, swipe the finger to the left, and release it, the itemTap event gets fired, if you have more than one <CarouselItem> and you do the same, it swipes to the next page instead.
Sorry but I've never tested the Carousel in such a scenario (inside ListView). So it is what it is for now...