makeNewCssVarSelect function infrastructure
Last updated: 2026-03-02T13:35:57.085Z
Metrics
LOC: 35
Complexity: 4
Params: 1
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)
| Source | Type |
|---|---|
| makeSelect | calls |