Stretch (kendo-) textarea to parent hight

2 Answers 56 Views
TextArea
Simon
Top achievements
Rank 1
Simon asked on 30 Sep 2021, 12:25 PM | edited on 06 Oct 2021, 09:32 AM

Hello,

I want to stretch the textarea to it's full parent height, without the dragable reziser and the parent is a flexbox.
What is the best way to achive it? Do I have to edit the underlying textarea css?

 

Setting the kendo-textarea to `flex: 1` stretches only the kendo element not the textarea inside.

Example: stackblitz

 

EDIT: Scribble for better understanding

2 Answers, 1 is accepted

Sort by
0
Stoyan
Telerik team
answered on 04 Oct 2021, 11:52 AM

Hi Simon,

Thanks for the provided information and snapshots.

To stretch the content of the Kendo Textarea to the parents' full height, the resizable input property can be used. In this scenario, the value of the resizeable property can be set to auto which specifies whether the TextArea component will adjust its height automatically, based on the content.

Please see the following StackBlitz demo that demonstrates the desired behavior:

https://stackblitz.com/edit/angular-kew5j5-8fefaq

I hope this helps. If any other questions come to mind, please do not hesitate to address them to us.

Regards,
Stoyan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Simon
Top achievements
Rank 1
commented on 06 Oct 2021, 09:15 AM

Thank you for your awnser. .I wasn't clear enoough what I wanted. So I made a scribble to show better what I'm wanting. Hope this helps to understand it better. 

In my project your anwsner let the textarea resize it's parent what I don't want. And it's not fully clickable when there is not enough text.

Currently using "@progress/kendo-angular-inputs": "^7.3.1" - stackblitz uses an older version but it looks it has the same behavior. 

0
Stoyan
Telerik team
answered on 08 Oct 2021, 09:38 AM

Hi Simon,

This question seems to be answered in the following ticket id: 1538297 - https://www.telerik.com/account/support-tickets/view-ticket/1538297. If you have any follow-up questions, please address them in the private support ticket.

I will also provide the answer from the private ticket here for public knowledge:

Indeed setting only the kendo-textarea to flex: 1 stretches the kendo element. In the StackBlitz demo, I can see that the right approach was taken but is missing a little piece and that is to target the .k-input CSS class which is set on the actual text area and set the flex: 1.

I've prepared a short StackBlitz demo that demonstrates the desired behavior:

https://stackblitz.com/edit/angular-kew5j5-hud8rj?file=app/app.component.ts

I hope this helps.

Regards,
Stoyan
Progress Telerik

Remote troubleshooting is now easier with Telerik Fiddler Jam. Get the full context to end-users' issues in just three steps! Start your trial here - https://www.telerik.com/fiddler-jam.
Tags
TextArea
Asked by
Simon
Top achievements
Rank 1
Answers by
Stoyan
Telerik team
Share this question
or