nstudio / nativescript-cardview

:diamonds: :clubs: NativeScript widget for Material Design CardView
MIT License
282 stars 51 forks source link

ListView itemTap event not fired when ripple effect is set to true #95

Closed programista25 closed 4 years ago

programista25 commented 6 years ago

I have this code in my page.xml file:

<ListView id="list-view" items="{{ dataItems }}" marginRight="-2" itemTap="listViewItemTap" separatorColor="#ffffff">
                        <ListView.itemTemplate>
                                <Card:CardView class="cardStyle" margin="10" elevation="10" radius="0" ripple="true">                                   
                                    <GridLayout rows="auto, 200, auto" columns="*">
                                        <Label text="{{ articletitle }}" textWrap="true" row="0" class="news-title"/>
                                        <IC:WebImage src="{{ articleimage.guid }}" stretch="aspectFill" row="1" placeholder="~/images/placeholder-image.png" />
                                        <!-- <Image src="{{ articleimage.guid }}" row="1" stretch="aspectFill" height="200" />  -->
                                        <label text="{{ articlecategory }}" row="2" class="news-category text-align-left"/>                                 
                                        <label text="{{ date }}" row="2" class="news-category text-align-right"/>                                   
                                    </GridLayout>                               
                                </Card:CardView>
                        </ListView.itemTemplate>
                    </ListView>

I set listViewItemTap as itemTap event on list view together with ripple effect on card view enabled. After tap nothing happend - listViewItemTap is not fired.

prv1 commented 5 years ago

itemTap="listViewItemTap" -> (itemTap)="listViewItemTap()"