mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
@@ -1,4 +1,4 @@
|
||||
import { Component, Element, Event, EventEmitter, Prop, State, Watch } from '@stencil/core';
|
||||
import { Component, Element, Event, EventEmitter, Method, Prop, State, Watch } from '@stencil/core';
|
||||
|
||||
import { Color, Mode, StyleEvent, TextFieldTypes, TextInputChangeEvent } from '../../interface';
|
||||
import { debounceEvent, deferEvent, renderHiddenInput } from '../../utils/helpers';
|
||||
@@ -246,6 +246,13 @@ export class Input implements InputComponent {
|
||||
this.ionInputDidUnload.emit();
|
||||
}
|
||||
|
||||
@Method()
|
||||
focus() {
|
||||
if (this.nativeInput) {
|
||||
this.nativeInput.focus();
|
||||
}
|
||||
}
|
||||
|
||||
private emitStyle() {
|
||||
this.ionStyle.emit({
|
||||
'interactive': true,
|
||||
|
||||
@@ -55,6 +55,13 @@ It is meant for text `type` inputs only, such as `"text"`, `"password"`, `"email
|
||||
| `ionStyle` | Emitted when the styles change. |
|
||||
|
||||
|
||||
## Methods
|
||||
|
||||
| Method | Description |
|
||||
| ------- | ----------- |
|
||||
| `focus` | |
|
||||
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
*Built with [StencilJS](https://stenciljs.com/)*
|
||||
|
||||
Reference in New Issue
Block a user