Provide scrollToBottom method & after command callbackSee original GitHub issue
I’m trying to use this in a real application and I only have limited space to show a console.
maxHeight by using
contentClassName property. However now I want my console to scroll to bottom every time it’s needed (after a command is executed).
For this, I’m missing some public method on a component that would
- Scroll console to a bottom so that I can see my prompt after each command
- Allows me to specify a callback that will be executed after each command (so that I can call scrollToBottom there), right now I can do it in my custom commands, but I can’t do it if the command doesn’t exist.
Another option is to have boolean property that will scrollToBottom after command is executed. Maybe it’s worth even to have it true by default.
What do you think?
- Created 5 years ago
- Comments:8 (6 by maintainers)
Top GitHub Comments
As for the scroll to bottom thing, I thought I had already implemented that feature but as it seems it got lost somewhere. The terminal is definitely intended to scroll to bottom after input. Your idea of being able to toggle it is cool too, will consider adding it.
The command callback idea is really nifty and something I should have considered initially, it’s passed by me completely. I’ll consider adding that too.