xenforodependant_mobileApp/src/directives/fillcontainer.ts

13 lines
445 B
TypeScript

//With adaptations, strongly reseambles: https://forum.ionicframework.com/t/elastic-ion-textarea/55671/4
import {HostListener, Directive} from '@angular/core';
@Directive({
selector: '[fillcontainervertically]'
})
export class FillContainerVertically {
@HostListener('input',['$event.target'])
onInput(nativeElement: any): void {
nativeElement.style.height = nativeElement.parentNode.parentNode.scrollHeight + "px";
}
}