MCPcopy Create free account
hub / github.com/react-component/select / getTitle

Function getTitle

src/utils/commonUtil.ts:29–40  ·  view source on GitHub ↗
(item: DisplayValueType)

Source from the content-addressed store, hash-verified

27}
28
29export function getTitle(item: DisplayValueType): string {
30 let title: string = undefined;
31 if (item) {
32 if (isTitleType(item.title)) {
33 title = item.title.toString();
34 } else if (isTitleType(item.label)) {
35 title = item.label.toString();
36 }
37 }
38
39 return title;
40}

Callers 2

defaultRenderSelectorFunction · 0.90
SingleSelectorFunction · 0.90

Calls 1

isTitleTypeFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…