MCPcopy
hub / github.com/simstudioai/sim / labelFor

Function labelFor

packages/emcn/src/components/combobox/combobox.tsx:225–225  ·  view source on GitHub ↗
(v: string)

Source from the content-addressed store, hash-verified

223 const multiSelectLabel = useMemo(() => {
224 if (!multiSelect || !multiSelectValues || multiSelectValues.length === 0) return null
225 const labelFor = (v: string) => allOptions.find((opt) => opt.value === v)?.label ?? v
226 if (multiSelectValues.length === 1) return labelFor(multiSelectValues[0])
227 if (multiSelectValues.length === 2) {
228 return `${labelFor(multiSelectValues[0])}, ${labelFor(multiSelectValues[1])}`

Callers 1

combobox.tsxFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected