()
| 155 | |
| 156 | // used in SelectPanel.SearchInput |
| 157 | const moveFocusToList = () => { |
| 158 | const selector = 'ul[role=listbox] li:not([role=none])' |
| 159 | // being specific about roles because there can be another ul (tabs in header) and an ActionList.Group (li[role=none]) |
| 160 | const firstListElement = dialogRef.current?.querySelector(selector) as HTMLLIElement | undefined |
| 161 | firstListElement?.focus() |
| 162 | } |
| 163 | |
| 164 | /* Dialog */ |
| 165 | const dialogRef = React.useRef<HTMLDialogElement>(null) |
no outgoing calls
no test coverage detected