* Returns the select's options if present. Can be filtered to a subsection of the listbox if * provided via `element`.
(opts: {element?: HTMLElement} = {})
| 239 | * provided via `element`. |
| 240 | */ |
| 241 | getOptions(opts: {element?: HTMLElement} = {}): HTMLElement[] { |
| 242 | let {element = this.getListbox()} = opts; |
| 243 | let options = []; |
| 244 | if (element) { |
| 245 | options = within(element).queryAllByRole('option'); |
| 246 | } |
| 247 | |
| 248 | return options; |
| 249 | } |
| 250 | |
| 251 | /** |
| 252 | * Returns the select's trigger. |
no test coverage detected