sergiodlopes/jquery-flexdatalist

multiple, toggle: Removing items doesn't work correctly when toggled items exist earlier in the selection

ReformCopyright opened this issue · 0 comments

Because in multiple.remove, index = $li.index() counts the disabled <li> elements, which are not represented in the _this.value array. We need to look up the value to remove in _this.value or find the correct index with something like $multiple.find('li:not(.input-container):not(.disabled)').index($li).