melloware / react-logviewer

React Lazy LogViewer
https://melloware.github.io/react-logviewer/
Mozilla Public License 2.0
45 stars 10 forks source link

Prop `follow` does not work #14

Closed RazerM closed 2 months ago

RazerM commented 8 months ago

The follow prop is not working for me, I have tried it with and without <ScrollFollow>. The log viewer just stays at the top without scrolling to show new lines.

Here is a codesandbox with the test case, although you have to provide your own websocket. I'm not sure if follow is meant to work when changing text, but that didn't work either.

Edit codesandbox

melloware commented 8 months ago

Might be this original issue: https://github.com/mozilla-frontend-infra/react-lazylog/issues/40

I have not used the follow prop in any of my code so I have never tested it. PR is welcome though if you want to investigate and try and fix it!

RazerM commented 8 months ago

I don't think so, follow appears to work in the original version of the library.

melloware commented 8 months ago

Ahh most likely then an upgrade from react-virtualized which is deprecated to react-window ?

https://github.com/bvaughn/react-window

theo-lightworks commented 6 months ago

Any idea how this could be fixed? This would be useful for us.

melloware commented 6 months ago

I would think the method to debug would be here: https://github.com/melloware/react-logviewer/blob/2fc93e33c0531af29b4c3d77a16bcf759d1dc01c/src/components/Utils/utils.ts#L14-L30

melloware commented 2 months ago

Thanks to @ClemensElflein 5.1.0 is now released to NPM.