mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
feat(input): add getInputElement() (#17183)
expose internal <input> element fixes #17174
This commit is contained in:
@ -247,6 +247,14 @@ export class Input implements ComponentInterface {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the native `<input>` element used under the hood.
|
||||
*/
|
||||
@Method()
|
||||
getInputElement(): Promise<HTMLInputElement> {
|
||||
return Promise.resolve(this.nativeInput!);
|
||||
}
|
||||
|
||||
private getValue(): string {
|
||||
return this.value || '';
|
||||
}
|
||||
|
Reference in New Issue
Block a user