Skip to main content
Hello everyone. 

I am currently working on a task where I need the comment box on my page to expand dynamically as a user types. I have the current code in my cmp file. Would I need to include "onkeyup=AutoGrow" to the cmp file? I hope I explained this correctly. Thank you for any help!

                    <div onkeypress="{!c.handleEnterKey}"

                         id="user-input-textarea"

                         class="">

                        <lightning:textarea maxlength="400" 

                            label="Comment"

                            name="newCommentName" 

                            placeholder="Write a comment..." 

                            messageWhenValueMissing="{!$Label.c.RC_Comment}"

                            value="{!v.newCommentBody}" 

                            aura:id="commentTextBox"

                            class="llr-ltng-form-ele hide-label disabled-err-msg case-comment-textarea"

                            disabled="{!v.caseType == 'Item' || v.isSubmitting}"

                         />

                    </div>

 
2 answers
  1. Jun 14, 2021, 1:00 PM
    Hi guys, have you made this work?

    I've been struggling to find a good solution for a day now, any help would be highly appreciated!

    Cheers,

    Alex

     
0/9000