notadamking / react-typing-animation

A fully-featured typing animation in React that supports any valid JSX.
https://adamjking3.github.io/react-typing-animation-example/
266 stars 42 forks source link

Always scroll up in an overflowed container #29

Closed doumart closed 5 years ago

doumart commented 6 years ago

I don't know if it is possible but it could be convinient to scroll at the bottom instead to follow the new letters displayed.

notadamking commented 5 years ago

This should now be possible using the new onTyping method. A modification of the following code should do the trick:

<Typing
    {...otherProps}
    onTyping={() => { window.scrollTop = window.scrollHeight; }}
/>