* Focuses the menu trigger. * @param origin Source of the menu trigger's focus.
(origin?: FocusOrigin, options?: FocusOptions)
| 262 | * @param origin Source of the menu trigger's focus. |
| 263 | */ |
| 264 | focus(origin?: FocusOrigin, options?: FocusOptions) { |
| 265 | if (this._focusMonitor && origin) { |
| 266 | this._focusMonitor.focusVia(this._element, origin, options); |
| 267 | } else { |
| 268 | this._element.nativeElement.focus(options); |
| 269 | } |
| 270 | } |
| 271 | |
| 272 | /** Closes the menu and does the necessary cleanup. */ |
| 273 | protected _destroyMenu(reason: MenuCloseReason) { |