addChip(opt_chip) {
    if (this.isLocked_) {
      return;
    }

    var chip = null;
    if (opt_chip && opt_chip instanceof panels.Chip) {
      chip = /** @type {panels.Chip} */ (opt_chip);
    } else {
      var uid = goog.string.trim(
          typeof opt_chip == 'string' ? opt_chip : this.shadowInputElem_.value);
      chip = new panels.Chip(uid.replace(/,\s*$/, ''));
    }

    if (chip.getValue().length == 0) {
      return;
    }

    this.addChild(chip);
    chip.renderBefore(this.shadowInputElem_);
    this.shadowInputElem_.value = '';
    this.shadowInputElem_.placeholder = '';
    goog.style.setWidth(this.shadowInputElem_, 10);
  }
Adds a new chip to the chip holder using the selection in the input field.
Aborts if ChipHolder is locked.
@param {panels.Chip|string=} opt_chip The chip or UID to render.