'use client' type ComboItem = { id: string; label: string } type ComboBoxProps = { value: string // ausgewählte ID items: ComboItem[] // { id, label } onSelect: (id: string) => void } export default function ComboBox({ value, items, onSelect }: ComboBoxProps) { const selected = items.find(i => i.id === value) return (
{items.map((item) => (
onSelect(item.id)} >
{item.label} {item.id === value && ( )}
))}
) }