bindEvents method private presentation

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

Metrics

LOC: 17 Complexity: 5 Params: 0

Signature

bindEvents(): : void

Source Code

  private bindEvents(): void {
    if (!this.input || !this.dropdown) return;

    this.input.addEventListener("focus", () => this.open());
    this.input.addEventListener("click", () => this.open());
    this.input.addEventListener("input", () => this.onInputChange());
    this.input.addEventListener("keydown", (e) => this.onKeyDown(e));

    this.dropdown.addEventListener("mousedown", (e) => {
      const li = (e.target as HTMLElement).closest<HTMLElement>(".fa-ss__opt");
      if (!li || li.dataset.disabled) return;
      e.preventDefault();
      this.selectByValue(li.dataset.value!);
    });

    document.addEventListener("mousedown", this.boundHandleOutsideClick);
  }

No outgoing dependencies.

No incoming dependencies.