in your component.
this.textArea points to “@ViewChild(‘myTextArea’) private textArea: IonTextarea;” and you have a #myTextArea on your textarea element.
thank you so much for this fix. this is really a broken autogrow attribute!
hopefully they will fix that
One remark:
Dont put it in oninit - rather in ionviewdidenter
For my app I ran in a race condition with ngoninit.
With ionviewdidenter it was a good workaround for the broken autogrow feature
since you are not answering directly to me I am unsure if you are writing this in my direction.
if so:
I cannot follow. Pretty sure it is because of my minor knowledge about ionic/angular in comparison to yours, but I cannot make value out of your short remark. Care to elaborate. maybe?
Your advice is good, but I fear it’s misaimed, because @stplush was talking about ngAfterViewInit, while you’re warning not to use ngOnInit. Those are two different lifecycle events, and while you’re right that what @stplush wants to do can’t be done in ngOnInit, it can be done in ngAfterViewInit (because that’s when you’re guaranteed that properties decorated by @ViewChild have been resolved), and I would consider that the most logical place to do it.
damn, so I somehow overlooked his hook. thank you, didnt realize that.
I honestly dont know where I took ngOnInit from… must have been jumping between posts.
Will give it a try with ngAfterViewInit() as well just to get more used to those hooks as well (never learned angular from scratch, I started with ionic and stuck to ionic hooks so far)