question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide scrollToBottom method & after command callback

See original GitHub issue

Hi again,

I’m trying to use this in a real application and I only have limited space to show a console. I’ve set 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

  1. Scroll console to a bottom so that I can see my prompt after each command
  2. 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?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
linuswillnercommented, Nov 15, 2018

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.

0reactions
linuswillnercommented, Nov 20, 2018

Moving this conversation to #39.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Provide scrollToBottom method & after command callback #36
Hi again, I'm trying to use this in a real application and I only have limited space to show a console. I've set...
Read more >
Scroll to bottom of div? - javascript - Stack Overflow
Is there a way to keep it scrolled to the bottom by default using JS? Is there a way to keep it scrolled...
Read more >
Window.scrollTo() - Web APIs | MDN
A dictionary containing the following parameters: top. Specifies the number of pixels along the Y axis to scroll the window or element.
Read more >
Callbacks / Callables - Manual - PHP
A method of an instantiated object is passed as an array containing an object at index 0 and the method name at index...
Read more >
jQuery Command Line Interpreter Plugin - Terminal Emulator
A simple jQuery based terminal emulator that makes it easy to create command line interpreter for your website or web application.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found