selectByValue method private presentation

Last updated: 2026-03-04T23:21:38.428Z

Metrics

LOC: 10 Complexity: 5 Params: 1

Signature

selectByValue(value: string): : void

Source Code

  private selectByValue(value: string): void {
    const found = this.flat.find((o) => o.value === value);
    if (!found) return;
    this._value = found.value;
    this._label = found.label;
    if (this.hiddenInput) this.hiddenInput.value = this._value;
    this.close(false);
    if (this.input) this.input.value = this._label;
    for (const cb of this._listeners) cb(this._value, this._label);
  }

No outgoing dependencies.

No incoming dependencies.