Tengo un componente TextArea:
<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} />Y probé esto ( React Scroll to bottom of textarea ):
constructor (props) { super(props) ... this.textInput = React.createRef() } componentDidUpdate () { ... this.textInput.current.scrollTop = this.textInput.current.scrollHeight }Pero la barra de desplazamiento no se mueve hacia abajo y solo aparecen las primeras 3 líneas a medida que el usuario habla y el valor del texto crece. ¿Me estoy perdiendo de algo?