makeNewCssVarSelect function infrastructure

Last updated: 2026-03-02T13:35:57.085Z

Signature

makeNewCssVarSelect(options?: { disabled?: boolean; placeholder?: string; multiple?: boolean; }): : HTMLElement

Summary

Helpers para nova estrutura CSS-var do antd v5.17+ (sem .ant-select-selector). O input .ant-select-input é filho direto de .ant-select-content e é o trigger.

Source Code

function makeNewCssVarSelect(options?: {
  disabled?: boolean;
  placeholder?: string;
  multiple?: boolean;
}): HTMLElement {
  const wrapper = document.createElement("div");
  wrapper.className = options?.multiple
    ? "ant-select ant-select-multiple ant-select-css-var"
    : "ant-select ant-select-single ant-select-css-var";
  if (options?.disabled) wrapper.classList.add("ant-select-disabled");

  const content = document.createElement("div");
  content.className = "ant-select-content";

  const placeholder = document.createElement("div");
  placeholder.className = "ant-select-placeholder";
  placeholder.textContent = options?.placeholder ?? "";

  const input = document.createElement("input");
  input.className = "ant-select-input";
  input.setAttribute("role", "combobox");
  input.setAttribute("aria-expanded", "false");
  input.setAttribute("aria-haspopup", "listbox");
  input.type = "search";

  content.appendChild(placeholder);
  content.appendChild(input);
  wrapper.appendChild(content);

  const suffix = document.createElement("div");
  suffix.className = "ant-select-suffix";
  wrapper.appendChild(suffix);

  return wrapper;
}

No outgoing dependencies.

Impact (Incoming)

graph LR makeNewCssVarSelect["makeNewCssVarSelect"] makeSelect["makeSelect"] makeSelect -->|calls| makeNewCssVarSelect style makeNewCssVarSelect fill:#dbeafe,stroke:#2563eb,stroke-width:2px click makeNewCssVarSelect "38b215aee5d1aa7d.html" click makeSelect "75e6fe1e0954bfa2.html"
SourceType
makeSelect calls