Topic: textarea height
ammi
pro
asked 3 days ago
How can I automatically adjust the height of textarea so that all content in myNotes is fully visible without a vertical scrollbar? It should work for manual input, pasted content, and when myNotes is populated programmatically.
<mdb-form-control>
<textarea type="text" id="iComment"
class="form-control" [(ngModel)]="myNotes" mdbInput>
</textarea>
<label mdbLabel class="form-label" for="iComment">Notes</label>
</mdb-form-control>
Arkadiusz Idzikowski
staff
answered 2 days ago
We do not have any special directives/inputs for textarea. For your use case probably the simplest option would be to use cdkTextareaAutosize directive from the @angular/cdk utilities.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: MDB5 10.0.0
- Device: Laptop
- Browser: Chrome
- OS: W11
- Provided sample code: No
- Provided link: No