Sets focus onto this option.
(_origin?: FocusOrigin, options?: FocusOptions)
| 188 | |
| 189 | /** Sets focus onto this option. */ |
| 190 | focus(_origin?: FocusOrigin, options?: FocusOptions): void { |
| 191 | // Note that we aren't using `_origin`, but we need to keep it because some internal consumers |
| 192 | // use `MatOption` in a `FocusKeyManager` and we need it to match `FocusableOption`. |
| 193 | const element = this._getHostElement(); |
| 194 | |
| 195 | if (typeof element.focus === 'function') { |
| 196 | element.focus(options); |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | /** |
| 201 | * This method sets display styles on the option to make it appear |
nothing calls this directly
no test coverage detected