MCPcopy
hub / github.com/Semantic-Org/Semantic-UI-React / renderItemContent

Function renderItemContent

src/modules/Dropdown/Dropdown.js:41–60  ·  view source on GitHub ↗
(item)

Source from the content-addressed store, hash-verified

39 options ? options.map((option) => _.pick(option, ['key', 'value'])) : options
40
41function renderItemContent(item) {
42 const { flag, image, text } = item
43
44 // TODO: remove this in v3
45 // This maintains compatibility with Shorthand API in v1 as this might be called in "Label.create()"
46 if (_.isFunction(text)) {
47 return text
48 }
49
50 return {
51 content: (
52 <>
53 {Flag.create(flag)}
54 {Image.create(image)}
55
56 {text}
57 </>
58 ),
59 }
60}
61
62/**
63 * A dropdown allows a user to select a value from a series of options.

Callers 1

DropdownClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…