MCPcopy Create free account
hub / github.com/editablejs/editable / findItem

Function findItem

packages/ui/src/dropdown.tsx:119–124  ·  view source on GitHub ↗
(items: DropdownItem[])

Source from the content-addressed store, hash-verified

117
118 const activeItem = React.useMemo(() => {
119 const findItem = (items: DropdownItem[]): DropdownItemProps | null => {
120 for (const item of items) {
121 if (item !== 'separator' && item.value === value) return item
122 }
123 return null
124 }
125 return findItem(items)
126 }, [items, value])
127

Callers 1

dropdown.tsxFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…