Scroller as a console log

Scroller as a console log

kthorngrenkthorngren Posts: 21,208Questions: 26Answers: 4,928
edited February 2017 in Free community support

I'm experimenting with the Scroller extension to see if I can use it a log message display. As new messages are added to the table the log window should scroll to the bottom (only if the user is not somewhere else in the display) to display the latest messages. The scrolling works with `table.row(':last').scrollTo(false);' but the problem is the Scroller doesn't always display the data. It seems that after a certain number of rows (100 maybe) the Scroller has problems displaying the data if the window is being scrolled.

Here is the test case. It starts out with 25 rows then the script adds 4 rows at a time at 1 second intervals. When it reaches ~80 rows the output changes to a 45 degree linear gradient. Scrolling above this then back down will properly display the rows.

Currently I have another method using things like $('.dataTables_scrollBody')[0].offsetHeight) and $('.dataTables_scrollBody').scrollTop() to control the scrolling. I wrote the code when I didn't understand anything about DT and JS and it has a memory leak. Instead of fixing it I was going to try Scroller for the API's available. If Scroller won''t work I will fix my original code.

Kevin

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.