nativescript-carousel icon indicating copy to clipboard operation
nativescript-carousel copied to clipboard

[iOS] ListView inside CarouselItem not tapable

Open mrmonat opened this issue 6 years ago • 1 comments

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.

mrmonat avatar Oct 16 '19 00:10 mrmonat

Sorry but I've never tested the Carousel in such a scenario (inside ListView). So it is what it is for now...

manijak avatar Dec 04 '19 10:12 manijak