Multiple selection disappears on click event

4 posts, 0 answers
  1. Peter
    Peter avatar
    44 posts
    Member since:
    Jan 2014

    Posted 29 Mar Link to this post

    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>

  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 31 Mar Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
  4. Peter
    Peter avatar
    44 posts
    Member since:
    Jan 2014

    Posted 22 Aug in reply to Alexander Popov Link to this post

    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

  5. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 25 Aug Link to this post

    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.
     
Back to Top
Kendo UI is VS 2017 Ready