Scroller

Scroller

jamieb22jamieb22 Posts: 10Questions: 7Answers: 0

Greetings

I have some concerns about the Scroller plugin. As I see it there are a couple of issues:

1) The plugin doesn't appear to load records in advance of your current position. i.e. if you are scrolling, you need to scroll until there are no more records, then the page loads with the new records. It would be nice if scroller could load the records in the background whilst you are scrolling, so that when you get there the records are already available and you do not need to wait for new records to be loaded.

2) When the plugin loads records, new records are displayed from the top, instead of after the last displayed record. As a user, it takes a while to realize that the newly loaded records start from the top again - or very often, actually above the visible area. The effect is that the user loses track of where they are in the results. Is there a way for the records to be loaded from the point of the last displayed record?

3) The constraint that all row needs to be the same size, is quite hefty one. We'd ideally like to use the fnOpen function to display additional information about a particular row, but alas this changes the row size, and throws the Scroller plugin out of whack.

Is there any hope of solving any of the above problems?

Much appreciate

Jamie

Answers

  • allanallan Posts: 61,617Questions: 1Answers: 10,089 Site admin

    HI Jamie,

    Thanks for your feedback.

    1. It does so some degree in that it overloads the current viewport. It can be customised, but typically it will load the current page + 3 other pages of data - or thereabouts! However, yes, this isn't really loading in advance, that would be nice! I presume you are specifically referring to server-side processing here btw?

    2. I'm afraid I don't really understand this point. When you scroll, the scrolling should retain position new rows are being added. Is that not happening for you? The whole point of scroller is that it should look like you are scrolling the whole data set.

    3. Yes its a real pain, but it is needed in order to simplify the calculations. Otherwise the height for every row needs to be calculates and tracked, rather than just doing rows * rowHeight.

    Is there any hope of solving any of the above problems?

    1. Possibly. I suspect with some development effort, it might be possible, but DataTables isn't really designed for it, so it is not likely to be a trivial fix.

    2. Sounds like it might be a bug, but I'd need a way to reproduce the error.

    3. Its certainly possible to do, but it will impact performance significantly and would likely require a good bit of development work as well.

    I don't currently have any plans to implement 1 and 3 myself as I have other priorities for the project, but pull requests are certainly welcome.

    Regards,
    Allan

This discussion has been closed.