MCPcopy Create free account
hub / github.com/coder/coder / renderOptionContent

Function renderOptionContent

site/src/components/Autocomplete/Autocomplete.tsx:247–259  ·  view source on GitHub ↗
(option: TOption)

Source from the content-addressed store, hash-verified

245 };
246
247 const renderOptionContent = (option: TOption) => {
248 const optionLabel = getOptionLabel(option);
249 const selected = isSelected(option);
250
251 return renderOption ? (
252 renderOption(option, selected)
253 ) : (
254 <>
255 <span className="flex-1">{optionLabel}</span>
256 {selected && <CheckIcon className="size-4 shrink-0" />}
257 </>
258 );
259 };
260
261 const isInlineInputTarget = (target: EventTarget | null) =>
262 target instanceof Node &&

Callers 1

AutocompleteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected