+1-888-365-2779
Try Now
More in this section

Forums / Thunder / Bad implimentation on _removeSelectedItem

Bad implimentation on _removeSelectedItem

2 posts, 0 answered
  1. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    03 Apr 2013
    Link to this post
    Dynamic content selector field control...to remove items from the list you're doing it by matching the name?

    Ran into a situation where a character in the name coming down was encoded where the html wasn't (sitefinity did this, nothing custom).  So end result was the user couldn't delete the item.

    You should be removing by ID
    for (var i = 0; i < data.items.length; i++) {
               if (data.items[i].OriginalContentId == itemToRemove.data("id")) {
                   this._selectedItems.items.splice(i, 1);
                   break;
               }
           }

    <script id="ul-template" type="text/x-kendo-template">
        <li>
            <span data-bind="text: Title, attr: {data-id: OriginalContentId}"> </span>
            <a class="sf_binderCommand_remove sfRemoveBtn remove">Remove</a>                           
        </li>
    </script>

  2. Marin Atanasov
    Marin Atanasov avatar
    62 posts
    Registered:
    24 Sep 2012
    04 Apr 2013
    Link to this post
    Hello Steve,

    Thank you so much for pointing out this issue and providing us with the solution for it. We will include the fix in the next version of Thunder.

    Your telerik points have been updated. Please let me know if I can be of further help.

    All the best,
    Marin Atanasov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered