fix(textarea): autogrow (#18822)

fixes #18744
This commit is contained in:
Manu MA
2019-07-17 19:23:13 +02:00
committed by GitHub
parent 978cc39009
commit 26e6d6f115

View File

@ -193,10 +193,12 @@ export class Textarea implements ComponentInterface {
this.ionInputDidLoad.emit();
}
// TODO: performance hit, this cause layout thrashing
private runAutoGrow() {
const nativeInput = this.nativeInput;
if (nativeInput && this.autoGrow) {
readTask(() => {
nativeInput.style.height = 'inherit';
nativeInput.style.height = nativeInput.scrollHeight + 'px';
});
}