Hi Community,
I'm facing some difficulties to set auto resize Text Area for read only message box.
Kindly, help me with some suggestions.
Hi @Sandip Saha ,
I would suggest you to follow this steps for auto resizing the read only message box based on its content.
1) Create a screen action with a JS to auto resize text area.
2) Call that screen action in the OnReady event of the same screen with another JS and set a interval.
3) You can add css as per your requirement .(Not mandatory)
Hello @Sandip Saha ,
For Resize Textarea in Outsystems
you can refer this solutions
https://www.outsystems.com/forums/discussion/26511/auto-resize-text-area-to-fit-content/
I hope you will find the Solutions or
you can also use the Forge Components
https://www.outsystems.com/forums/discussion/33320/text-area-auto-resizer-how-to-use-the-text-area-auto-resizer-widget/
https://www.outsystems.com/forge/component-overview/2133/text-area-auto-resizer
https://www.outsystems.com/forge/component-overview/8782/text-area-auto-resize-reactive-sample
I hope this will help you
Thanks
Navneet
Hi Sandip,
is it okay if it's scrollable ?
Thanks,
Ajit Kurane.
Hi Ajit,
scrollable will be fine but I'm looking for all possible ways on how to do that.
Hello Sandip Saha,
outsystems UI having the css pointer-events:none
you have to override with the below css.
.form-control[data-textarea][disabled]
{
pointer-events:initial;
}
Kindly refer the attached oml and url.
https://personal-zwqyrq9s.outsystemscloud.com/Pract/monthPicker?_ts=638107577166194507
Hope this helps!
Regards,
Ellakkiya.S
Hi Ellakkiya,
Thanks for your help. Definitely its a great solution but I'm little bit of curious about how we can auto resize the box based on content instead of scrollbar.
Thanks & Regards,
Sandip Saha
Hi Sandip Saha ,
we can resize the textarea when it is disabled. kindly refer the attached url and oml
Hope it helps!
Hi,
I've got your suggestion and its pretty helpful.
I'm asking if there is any possibility on resizing the box based on the content. As an example, if there is 7 line of text content the box will auto grow only to fit that content and user can view complete content without scrolling.
Hope you're getting my point.
if it is read only you can just put it in container as expression then just style container that will look like a text-area
Just an alternative solution
Hi @Sandip Saha
You can try the below solution but you have to provide approx values.Just add rows in TextArea attributes and define it's value as provided in the below image.
RegardsKrishnanand Pathak
Hello Sandip,
Try below expression in style. It works as expected.:
Hi members,
First of all, thanks to everyone for your valuable suggestions.
Based on all of your suggestions, I would like to suggest going with @Md Sohel Khan 's idea,
because as per my research and development using java script will be more suitable to match my requirement for both the application (reactive or traditional).
@Md Sohel Khan, adding on top of it that in traditional application you need to add RunJavaScript action in the preparation.