feat(input): add getInputElement() (#17183)

expose internal <input> element

fixes #17174
This commit is contained in:
Manu MA
2019-01-21 17:19:40 +01:00
committed by GitHub
parent cf9f53b833
commit a90084c077
9 changed files with 72 additions and 3 deletions

View File

@ -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 || '';
}