Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3560

Problem in re-sizing the textarea object

$
0
0

Hi,

 

I am trying to re-size the textarea(sap.m.Textarea). Process is textarea object would be 2nd or 3rd page based on some condition and based on the contents(from odata service) it should be re-size to display the information in single view (without scroll).

 

I have used below code in onBeforeRendering function and it's working fine, if i am displaying the textarea object in 1st page.

 

$(function(){

$("textarea").height( $("textarea")[0].scrollHeight );

$("textarea").on("keyup",function (){

var h=$(this);

h.height(1).height(h[0].scrollHeight);

}

);

}

);

 

But as per requirement, it's not happending (though textareas are in 2nd/3rd page and generating based on condition only). I have tried to call the onBeforeRendering function on sapApp.to("pageid), the respective function is triggering, but it's not executing fully.

 

is there any way to get the scrolheight of the textarea object so, i can set the initial length, while declaring the object.

 

Regards,

Praveer.


Viewing all articles
Browse latest Browse all 3560

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>