-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List View Click #11114
Comments
Hello, could you post more info about this issue? What exactly is the issue that is happening? Is there anything logged to the console? |
@jgw96 Click event is not triggred properly. i mean the function
Nothing logged in the console. |
Hi I'm experiencing the same problem on Android. In v3.0.1, it's adding
to ion-item when I'm using touch event handlers like (press)="action()", which makes scrolling impossible. |
maybe similar or same issue like #11110. I have a list of |
@kumaresan-cgvak For Handling click events for list items you must use the button and add the ion-item property similar to this: <ion-content>
<ion-list>
<button ion-item (click)="homePage()">Home Page</button>
<button ion-item (click)="about()">About Page</button>
</ion-list>
</ion-content> Refer to the component document here: http://ionicframework.com/docs/components/#lists If you want to avoid the click delay then use tap: <ion-list>
<ion-item (tap)="homePage()">Home</ion-item>
<ion-item (tap)="aboutPage()">About Us</ion-item>
</ion-list> |
@chandanch tap seems to work properly. In the docs is (click) used everywhere maybe it should be mentioned that tap should be used. I didn't find that and in earlier versions (click) worked without any delay. Since tap works for me this issue is solved. |
@e9li If you have upgraded to 3.0.1 the click delay is resolved |
@chandanch I've already updated to 3.0.1 but the click doesn't work like before, sometimes without and sometimes with delay. With tap it works like a charm. |
@chandanch thank you for your info. maybe I missed something, but this cannot be found in the docs. all examples are with click and so the people do this with click and don't know they should use tap instead. Including that into the docs won't be that difficult. |
@jgw96 It seems that the click event is not firing for some clicks. I would have to touch the screen 3 times before the event is registered. The click event has been altered in 3.0.1 or 3.0.0 It is not behaving the same as the 2.x.x versions. |
@chandanch If we use (tap) instead of (click) in the list view of side menu. Then using |
@jgw96 Do we have any feedback on this issue? |
@kumaresan-cgvak When using list you must add the ion-item as an attribute to the button component, this will make the item(s) inside the list clickable or tappable. Use: <ion-list>
<button ion-item (click)="getDetails()">Item 1</button>
<button ion-item (click)="getDetails()">Item 2</button>
</ion-list> Refer to this for more details: http://ionicframework.com/docs/api/components/item/Item/ |
@chandanch Thank you |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Ionic version: (check one with "x")
[ ] 1.x
[ ] 2.x
[x] 3.x
I'm submitting a ... (check one with "x")
[X] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:
List view click event is not working properly
Expected behavior:
click event should be trigered properly
Related code:
Other information:
Ionic info: (run
ionic info
from a terminal/cmd prompt and paste output below):The text was updated successfully, but these errors were encountered: