Removes an item from the selection, if it is selected.

@param item The item to remove. May be an item with 'id' and 'text' properties or just an ID.
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();
    }
777889
public void deselectSelectedItem() {
        // Check whether tree has selected item
        if (selectedItem != null) {
            clearSelectedStyles(selectedItem);
            setSelectedItem(null);
            SelectionEvent.fire(this, null);
        }
    }
1008819
public void setItem(java.util.Collection<Stage> item) {
        if (item == null) {
            this.item = null;
            return;
        }

        this.item = new java.util.ArrayList<Stage>(item);
    }
1156559
private void setSelectedItem(final ListBox list, final String item) {
    final int nitems = list.getItemCount();
    for (int i = 0; i < nitems; i++) {
      if (item.equals(list.getValue(i))) {
        list.setSelectedIndex(i);
        return;
      }
    }
  }
702016
public function remove($id)
    {
        $id = (string) $id;

        $this->validateRemove($id);

        if (!$this->has($id)) {
            return;
        }

        unset($this->items[$id]);
    }
559056
public void deselectItem() {

        getElement().removeClassName(I_CmsLayoutBundle.INSTANCE.contextmenuCss().selected());
        m_parentMenu.setSelectedItem(null);
    }
870386
protected final boolean callbackOptionsItemSelected(MenuItem item) {
        if (DEBUG) Log.d(TAG, "[callbackOptionsItemSelected] item: " + item.getTitleCondensed());

        boolean result = false;
        if (mActivity instanceof OnMenuItemSelectedListener) {
            OnMenuItemSelectedListener listener = (OnMenuItemSelectedListener)mActivity;
            result = listener.onMenuItemSelected(Window.FEATURE_OPTIONS_PANEL, item);
        } else if (mActivity instanceof OnOptionsItemSelectedListener) {
            OnOptionsItemSelectedListener listener = (OnOptionsItemSelectedListener)mActivity;
            result = listener.onOptionsItemSelected(item);
        }

        if (DEBUG) Log.d(TAG, "[callbackOptionsItemSelected] returning " + result);
        return result;
    }
130193
private boolean remove(List<String> list, String item) {
        if (null != list) {
            if (list.remove(item)) {
                this.num_items--;
                return true;
            }
        }
        return false;
    }
677308
def remove(self, item):
        ''
        i = self.index(item)
        del self._keys[i]
        del self._items[i]
404151
function (item) {
            var ri,
                key = this._getKeyForItem(item),
                list = this.$renderedItems;
            if (key) {
                list = this.$renderedItemsMap[key];
            }
            for (var i = 0; i < list.length; i++) {
                ri = list[i];
                if (key || ri.item === item) {
                    this.$parent.removeChild(ri.component);
                    list.splice(i, 1);
                    ri.component.destroy();
                    return;
                }
            }
        }
881876
def remove_item(self, item):
        """"""
        index = self.items.index(item)
        self.beginRemoveRows(QtCore.QModelIndex(), index, index)
        self.items.remove(item)
        self.endRemoveRows()
1280873
public void remove(ItemState item)
   {
      if (item.isNode())
      {
         remove(item.getData().getQPath());
      }
      else 
      {
         removeProperty(item, -1);
      }
   }
639665
protected void collapseItems(MaterialTreeItem item) {
        item.collapse();
        item.setHide(false);

        item.getTreeItems().forEach(this::collapseItems);
    }
843661
public void replaceItem(CmsListItem item) {

        CmsListItem oldItem = getList().getItem(item.getId());
        if (oldItem != null) {
            int index = getList().getWidgetIndex(oldItem);
            getList().removeItem(oldItem);
            if (index >= getList().getWidgetCount()) {
                getList().addItem(item);
            } else {
                getList().insertItem(item, index);
            }
        }
    }
1283833
@Override
    public void removeItem(int itemID) {
        super.removeItem(itemID);
        ratingsItem.remove(itemID);
        itemsStats.remove(itemID);
    }
238138
public void select(Item item, boolean considerSelectableFlag) {
        if (considerSelectableFlag && !item.isSelectable()) {
            return;
        }
        item.withSetSelected(true);
        if (mSelectionListener != null) {
            mSelectionListener.onSelectionChanged(item, true);
        }
    }
716429
public function remove($item)
    {
        $renumberKeys = false;
        foreach ($this->items as $key => $value) {
            if ($item === $value) {
                $renumberKeys = true;
                unset($this->items[$key]);
            }
        }
        if ($renumberKeys) {
            $this->items = array_values($this->items);
        }
    }