mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
docs(input): update setFocus description (#26487)
Co-authored-by: Evan Kleiner <ekleiner@synap.io>
This commit is contained in:
2
core/src/components.d.ts
vendored
2
core/src/components.d.ts
vendored
@ -1145,7 +1145,7 @@ export namespace Components {
|
|||||||
*/
|
*/
|
||||||
"setBlur": () => Promise<void>;
|
"setBlur": () => Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Sets focus on the native `input` in `ion-input`. Use this method instead of the global `input.focus()`.
|
* Sets focus on the native `input` in `ion-input`. Use this method instead of the global `input.focus()`. Developers who wish to focus an input when a page enters should call `setFocus()` in the `ionViewDidEnter()` lifecycle method.
|
||||||
*/
|
*/
|
||||||
"setFocus": () => Promise<void>;
|
"setFocus": () => Promise<void>;
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -305,6 +305,9 @@ export class Input implements ComponentInterface {
|
|||||||
/**
|
/**
|
||||||
* Sets focus on the native `input` in `ion-input`. Use this method instead of the global
|
* Sets focus on the native `input` in `ion-input`. Use this method instead of the global
|
||||||
* `input.focus()`.
|
* `input.focus()`.
|
||||||
|
*
|
||||||
|
* Developers who wish to focus an input when a page enters
|
||||||
|
* should call `setFocus()` in the `ionViewDidEnter()` lifecycle method.
|
||||||
*/
|
*/
|
||||||
@Method()
|
@Method()
|
||||||
async setFocus() {
|
async setFocus() {
|
||||||
|
|||||||
Reference in New Issue
Block a user