react-textarea-autosize
react-textarea-autosize copied to clipboard
Custom Row Height
Hi, right now each row is defined as 50px, I need rows which are 45px, Is there a way to define custom row height so each row will add a dynamic row height?
Not sure if I understand the question - the row height gets calculated based on the css you put on the textarea.
@Andarist What do you mean? If I set height to be 45, each row will be 45?
@Andarist tested it now, Added height 45 to the component, min height, height to the container and still its 50.
<div className="d-flex-fill height-45">
<TextareaAutosize
autoFocus={autoFocus}
ref={this.textAreaRef}
maxRows={maxRows}
rows={rows}
value={value}
disabled={disabled}
maxLength={maxLength}
onChange={this.handleInputChange}
className="py-3 px-4 height-45 font-size-md "
/>
I am facing this issue too. I am trying to pass height as '100%' but library is overriding the value to 25px