docs(input): update setFocus description (#26487)

Co-authored-by: Evan Kleiner <ekleiner@synap.io>
This commit is contained in:
Evan Kleiner
2022-12-15 14:20:06 -08:00
committed by GitHub
parent c994a20710
commit 4a8b3c0773
2 changed files with 4 additions and 1 deletions

View File

@ -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>;
/** /**

View File

@ -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() {