// A dropdown that matches the dashboard: a clear button, a solid list with a check on the current // choice, keyboard support, and a search box. Typing while it is closed opens it and searches. // // { setQuery(e.target.value); setActive(0); }} placeholder={tr("Search")} aria-label={tr("Search {options}", { options: label || "options" })} aria-controls={id} aria-activedescendant={shown[active] ? `${id}-${active}` : undefined} /> )}
{!shown.length &&
{tr("No matches")}
} {shown.map(([v, text, hint], i) => (
setActive(i)} onClick={() => pick(v)}> {text} {hint && {hint}}
))}
)} ); }