react-textarea-autosize icon indicating copy to clipboard operation
react-textarea-autosize copied to clipboard

Custom Row Height

Open Jony-Y opened this issue 5 years ago • 4 comments

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?

Jony-Y avatar Mar 17 '19 10:03 Jony-Y

Not sure if I understand the question - the row height gets calculated based on the css you put on the textarea.

Andarist avatar Mar 17 '19 18:03 Andarist

@Andarist What do you mean? If I set height to be 45, each row will be 45?

JonathanYehie avatar Mar 18 '19 11:03 JonathanYehie

@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 "
         />

custom-row-height

Jony-Y avatar Mar 18 '19 12:03 Jony-Y

I am facing this issue too. I am trying to pass height as '100%' but library is overriding the value to 25px

Sygmus-1897 avatar Jul 09 '21 04:07 Sygmus-1897