Scroller doesn't set scrollbar position when table is first drawn

Scroller doesn't set scrollbar position when table is first drawn

Analytical360Analytical360 Posts: 12Questions: 2Answers: 0

So I'm using scroller with a very large table (>30000 rows) with server side processing.

If I'm in the middle of the table somewhere, and click the reload icon in the browser, It will re-draw the table, and load the data from the position I was before the redraw, as expected.

The problem is that the scrollbar stays at the top, so you cannot see the data that was just loaded as it's way down in the table somewhere. if I click the down arrow at the bottom of the scrollbar, it then loads the next batch of data from the server, and draws it at the top of the table, so now you can see the data, but cannot scroll up, as it's close to the top of the table.

This seems to be a new issue, as it didn't occur until we upgraded to version 2.0.1

The site is behind a firewall, so I can't attach a link.

I tried to use the debugger to upload the configuration information to you, but it appears i'm getting a 500 response from your server.

Thanks,

Jeff

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    If I'm in the middle of the table somewhere, and click the reload icon in the browser, It will re-draw the table, and load the data from the position I was before the redraw, as expected.

    Is this the browser's reload, and you've got stateSave enabled? Or do you have a reload button?

    Colin

  • Analytical360Analytical360 Posts: 12Questions: 2Answers: 0

    The browser's reload, and I have stateSave enabled.

  • colincolin Posts: 15,112Questions: 1Answers: 2,583
    Answer ✓

    Yep, I think I'm seeing the same issue here - thanks for reporting.

    I've raised it internally (DD-1298 for my reference) and we'll report back here when there's an update.

    Cheers,

    Colin

  • Analytical360Analytical360 Posts: 12Questions: 2Answers: 0

    Thanks

  • Analytical360Analytical360 Posts: 12Questions: 2Answers: 0

    I'm not sure if this is related, but it seems to me that maybe it is.

    It seems that scroller doesn't reliably calculate the scroll positions. I tried this out using the javascript console on our site. I ran 'mytable.scroller.toPosition(16170);' This seemed to always put the scroll bar in the same position, but the page that was requested by scroller to fill the data seems to be different every time.

    One of the fields in our sheet is a 7 digit UID number that I can use to track position. They are roughly in numerical order (although not strictly). running the above command from the javascript console, after scrolling to the end of the table first, the UID number at the center of the screen ranged from 17157 to 28287 (with a buffer size of 70 rows), or Page 80 to Page 133 (obtained with 'mytable.page.info();')

    Hopefully this helps find the problem.

    Jeff

  • Analytical360Analytical360 Posts: 12Questions: 2Answers: 0

    Although I can't seem to reproduce it on your jsbin.

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    We're happy to take a look if you can reproduce it.

    Colin

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    Thanks, I took a look and couldn't see anything obvious. Please can you give steps on how to reproduce, and what you're expecting.

    Colin

  • Analytical360Analytical360 Posts: 12Questions: 2Answers: 0

    Ok, so I load the page and open Developer tools.

    Starting at the top of the page, I type in the javascript console:

    mytable.scroller.toPosition(5000);

    Notice it what ID is shown in the Sample column.

    Now scroll to the bottom of the page using the scrollbar, then type the same command in the console.

    Notice that the ID is off by a few thousand records from where it was before.

    Similarly, if you scroll near the bottom of the table using the scroll bar and then, using the scroll wheel on your mouse, or the down arrow at the bottom of the scroll bar, slowly scroll through the table towards the bottom, the scroll bar will often bottom out before the end of the data. sometimes it will then jump back up to a higher position in the table, but the only way to reliably reach the end of the data is to drag the slider on the scrollbar up, let it load, then drag it to the bottom. slowly scrolling to the bottom doesn't work correctly most of the time.

    Thanks for having a look.

    Jeff

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    Thanks for those instructions, that really helps, and yep, that looks wonky to me. I've raised it internally (DD-1370 for my reference) and we'll report back here when there's an update.

    Cheers,

    Colin

  • Analytical360Analytical360 Posts: 12Questions: 2Answers: 0

    Thanks,

    Also, as a quick check, I switched temporarily back to the previous versions (those that were current before the release last October), and this problem didn't occur there. There were other problems, which is why we upgraded, but these problems seem new.

    Thanks,

    jeff

This discussion has been closed.