• Alex Stojanovic
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
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>