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

Multiple selection disappears on click event

3 Answers 157 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 29 Mar 2016, 06:32 AM

Hi,

I have an image with a click event in my ListView template - on the actual list item.

But by the time the click event fires, any multiple selection is lost.

No amount of preventDefault seems to fix this.

Perhaps I can code something complex to remember the selected items, but is there any way this would work without it?

 

<script id="group-available-template" type="text/x-kendo-template">
<div class="group available k-widget">
<div class="name">#:name#</div>
<div class="group-action arrow-left" id="add-assigned" data-bind="click: actions.addGroup">
<img src="../images/admin/arrowleft-16.png" />
</div>
</div>
</script>

3 Answers, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 31 Mar 2016, 08:21 AM
Hi Peter,

In this case it would be more appropriate to stop the event's propagation instead of preventing its default action.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Peter
Top achievements
Rank 1
answered on 23 Aug 2016, 03:58 AM

BTW I noticed that in a recent 2016 version of kendo, this is no longer a problem.

It still caused a regression bug for me, because the clicked item, is no longer classed as "selected" when writing code in the onselect event

0
Alexander Popov
Telerik team
answered on 25 Aug 2016, 07:53 AM
Hello Peter,

Would you be able to share a simplified Dojo example where the issue is replicated? 

Regards,
Alexander Popov
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
ListView
Asked by
Peter
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Peter
Top achievements
Rank 1
Share this question
or