This is a migrated thread and some comments may be shown as answers.

Clickable elements inside ListView Item

5 Answers 303 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Ioan
Top achievements
Rank 1
Ioan asked on 02 Mar 2015, 01:15 PM
Is there a way to make an element inside a ListView clickable without changing the state of the ListView's entire item ? 
http://jsbin.com/kevoso/3/edit
In this jsbin example, if I click on the Kendo Button, the ListView item won't change it's state but if I click on the favorite icon the item will change its state.

On another subject, It seems a thread started by me a few days ago in DataSource got deleted....

5 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 04 Mar 2015, 09:08 AM
Hi Ioan,

You may use the touch component. Please check the following example: http://dojo.telerik.com/@valchev/Ekefi

Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Ioan
Top achievements
Rank 1
answered on 06 Mar 2015, 08:20 AM
If I use the 'a' tag to have the entire list item clickable, it won't work. Mostly visually, to get that click effect over the entire list item. But if I click on an item  inside the listview, the entire item shouldn't looked clicked. It works with kendo buttons, but not with my own elements.
In your example you used 
<div>#: data # <span data-role="touch" data-tap="onTap">tap on me</span></div>
,but I need 
<a>#: data # <span data-role="touch" data-tap="onTap">tap on me</span></a>


http://dojo.telerik.com/EduWE/2
0
Alexander Valchev
Telerik team
answered on 10 Mar 2015, 06:26 AM
Hi Ioan,

In your example, the console.log fires as expected. Please check the attached screen shot and let me know what I am missing.

Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Ioan
Top achievements
Rank 1
answered on 10 Mar 2015, 08:24 AM
It fires, techincally it works, but when you press the button inside the element list, it looks like you're pressing the whole element. The background of the element list is changing too. I don't want the visual press effect to propagate on the whole element, just only the button I press inside the list element...
0
Petyo
Telerik team
answered on 12 Mar 2015, 07:00 AM
Hello Ioan,

the behavior you describe is by design and unavoidable, since the template contains an A element. To avoid that, you should not use A elements. 

Also, I think that you referred to this thread.

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
ListView (Mobile)
Asked by
Ioan
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Ioan
Top achievements
Rank 1
Petyo
Telerik team
Share this question
or