Deselect selected tree item
777889
public void deselectSelectedItem() {
        // Check whether tree has selected item
        if (selectedItem != null) {
            clearSelectedStyles(selectedItem);
            setSelectedItem(null);
            SelectionEvent.fire(this, null);
        }
    }
1232647
@When("^I de-select every item on the element on index '(\\d+?)'$")
    public void elementDeSelect(Integer index) {
        Select sel = null;
        sel = new Select(commonspec.getPreviousWebElements().getPreviousWebElements().get(index));

        if (sel.isMultiple()) {
            sel.deselectAll();
        }
    }
18151
@Override
  public void deselectAll() {
    if (!isMultiple()) {
      throw new UnsupportedOperationException(
        "You may only deselect all options of a multi-select");
    }

    for (WebElement option : getOptions()) {
      setSelected(option, false);
    }
  }
1221304
function cleanSelector (o) {
	var a = o.replace(/\s*,\s*/g, ",").replace(/\n/g, "").split(',');

	a = a.filter( function( item, index, inputArray ) {
		return inputArray.indexOf(item) == index;
	});

	return a.join(',\n');
}
88966
function(node) {
            if (utils.isArray(node)) {
                node.forEach(this.toggleSelect.bind(this));
            } else {
                if (node.isSelected()) this.removeSelectedNodes(node);
                else this.select(node);
            }
            return this;
        }
721426
def removeSelection( self ):
        
        results = self.removeItems( self.selectedItems() )
        self.emitSelectionFinished()
        return results
566221
def __remove_child(self, parent_tree_node, index):
        
        # get parent and item
        parent_item = self.__mapping[id(parent_tree_node)]
        # manage the item model
        self.item_model_controller.begin_remove(index, index, parent_item.row, parent_item.id)
        child_item = parent_item.children[index]
        parent_item.remove_child(child_item)
        self.__mapping.pop(id(child_item.data["tree_node"]))
        self.item_model_controller.end_remove()
366076
public void changeSelected(String selectNode, ServletRequest request)
    {
        _selectedNode = TreeHelpers.changeSelected(this, _selectedNode, selectNode, request);
    }
500000
function(item) {
        var id = item.id || item;

        var removedItem;
        var index = Selectivity.findIndexById(this._data, id);
        if (index > -1) {
            removedItem = this._data[index];
            this._data.splice(index, 1);
        }

        if (this._value[index] !== id) {
            index = this._value.indexOf(id);
        }
        if (index > -1) {
            this._value.splice(index, 1);
        }

        if (removedItem) {
            this.triggerChange({ removed: removedItem });
        }

        if (id === this._highlightedItemId) {
            this._highlightedItemId = null;
        }

        this._updateInputWidth();
    }
1073013
function() {
          if(angular.isArray(selectedItemsList)) {
            var ixSmItem = selectedItemsList.indexOf(smItem);
            if(smItem[selectedAttribute]) {
              if(-1 === ixSmItem) {
                selectedItemsList.push(smItem);
              }
            } else {
              if(-1 < ixSmItem) {
                selectedItemsList.splice(ixSmItem, 1);
              }
            }
          }
        }
1141908
def select_by_key(self, key):
        
        for item in self.children.values():
            if 'selected' in item.attributes:
                del item.attributes['selected']
        self.children[key].attributes['selected'] = 'selected'
        self._selected_key = key
        self._selected_item = self.children[key]
453960
def delete_selected_tree(self, modeladmin, request, queryset):
        
        # If the user has not yet confirmed the deletion, call the regular delete
        # action that will present a confirmation page
        if not request.POST.get('post'):
            return actions.delete_selected(modeladmin, request, queryset)
        # Otherwise, delete objects one by one
        n = 0
        for obj in queryset:
            obj.delete()
            n += 1
        self.message_user(request, _("Successfully deleted %s items." % n))
62421
def filter_tree(tree):
    """"""
    to_remove = []
    for elem in tree.findall('urldata'):
        valid = elem.find('valid')
        if valid is not None and valid.text == '0' and \
           valid.attrib.get('result', '').startswith('401'):
            to_remove.append(elem)
    root = tree.getroot()
    for elem in to_remove:
        root.remove(elem)
940117
private void deselectChildren(CmsTreeItem item) {

        for (String childId : m_childrens.get(item.getId())) {
            CmsTreeItem child = m_categories.get(childId);
            deselectChildren(child);
            child.getCheckBox().setChecked(false);
            if (m_selectedCategories.contains(childId)) {
                m_selectedCategories.remove(childId);
            }
        }
    }
1171503
function select_dropdown_item (item) {
          if(item) {
              if(selected_dropdown_item) {
                  deselect_dropdown_item($(selected_dropdown_item));
              }

              item.addClass($(input).data("settings").classes.selectedDropdownItem);
              selected_dropdown_item = item.get(0);
          }
      }
985760
def deleteSelected(self):
        ''
        ndeleted = self.deleteBy(self.isSelected)
        nselected = len(self._selectedRows)
        self._selectedRows.clear()
        if ndeleted != nselected:
            error('expected %s' % nselected)
481615
public void deselect() {
        SelectExtension<Item> selectExtension = mFastAdapter.getExtension(SelectExtension.class);
        if (selectExtension == null) {
            return;
        }
        for (Item item : AdapterUtil.getAllItems(mFastAdapter)) {
            selectExtension.deselect(item);
        }
        mFastAdapter.notifyDataSetChanged();
    }