Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

277
Vistas
How to always scroll to bottom of TextArea to display most recent text in React?

I have a TextArea component:

<TextArea
      ref={this.textInput}
      disabled={this.props.disabled || false}
      growing
      growingMaxLines={3 || growingMaxLines}
      maxlength={characterLimit}
      height={scrollY}
      style={textAreaStyle}
      value={this.state.value || this.props.value}
      placeholder={this.props.placeholder}
    />

And tried this (React Scroll to bottom of textarea):

constructor (props) {
     super(props)
     ...
     this.textInput = React.createRef()
}

componentDidUpdate () {
    ...
    this.textInput.current.scrollTop = this.textInput.current.scrollHeight
  }

But the scroll bar does not move to bottom and only the first 3 lines appear as the user speaks and text value grows. Am I missing something?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda