(container: HTMLElement, key: string)
| 8 | import { TextField } from "./text-field" |
| 9 | |
| 10 | function 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 | |
| 17 | export interface ListSearchProps { |
| 18 | placeholder?: string |