Bad implimentation on _removeSelectedItem

Posted by Community Admin on 05-Aug-2018 12:51

Bad implimentation on _removeSelectedItem

All Replies

Posted by Community Admin on 03-Apr-2013 00:00

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>

Posted by Community Admin on 04-Apr-2013 00:00

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

This thread is closed