MCPcopy Create free account
hub / github.com/anomalyco/opencode / findByKey

Function findByKey

packages/ui/src/components/list.tsx:10–15  ·  view source on GitHub ↗
(container: HTMLElement, key: string)

Source from the content-addressed store, hash-verified

8import { TextField } from "./text-field"
9
10function findByKey(container: HTMLElement, key: string) {
11 const nodes = container.querySelectorAll<HTMLElement>('[data-slot="list-item"][data-key]')
12 for (const node of nodes) {
13 if (node.getAttribute("data-key") === key) return node
14 }
15}
16
17export interface ListSearchProps {
18 placeholder?: string

Callers 1

ListFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected