row().scrollTo() not working
row().scrollTo() not working
Hi
I am trying the example for scrollTo and does not seem to work
https://datatables.net/extensions/scroller/examples/initialisation/api_scrolling
It should point to record 1000 but does not move
Having the same problem with my program
Thanks
JF
This discussion has been closed.
Replies
Hi @jfr ,
Good spot - apologies for that. We're looking at it now and will update when fixed,
Cheers,
Colin
Hi,
Committed the fix and it will be in the nightly shortly.
Thanks!
Allan
I am having this issue with scroller version 1.5.1 it simply does not move. Code:
data is on DOM
I am attempting:
but nothing
Hi @diegoponciano ,
That's right, that's the problem in the OP. This is now fixed, but not yet released, so you'll need to grab one of the nightly builds to get the fix. Apologies for the inconvenience,
Cheers,
Colin
Hi team,
I'm also having an issue with ScrollTo, as with the posters above it just seems to sit there at the top of the table. I just downloaded the latest version of datatables, so I'm on version 1.10.18.
My function to load the table, initialize it, and scrollTo are all in the same function and look like below. I've even tried moving the scrollTo outside of the function, wrapping the getData() function inside a $.when.done, and then calling scrollTo, and it still didn't help.
Hi @puffster ,
There was an outstanding issue for this, which was fixed this afternoon and will be available in the nightly build from tomorrow. You can find the nightly releases here.
Please could you try this again next week with that build and let us know if it addresses your issue.
Cheers,
Colin
Apologies for taking so long to get back on this...I'm using the nightly releases but it's still not working. It's entirely possible that I'm doing something incorrect.
Here's my calls to the nightly release:
And my javascript...the rowIndex & datatable both are showing correctly in the console.log:
I hope it's something I'm not doing right!!
Hi @puffster ,
There's a lot of code there. It's working in this example here - could you modify that example to demonstrate your problem, or could you link to your page.
Cheers,
Colin
Hi @colin
I am also trying to achieve same thing as @puffster. The example you have posted is not working if paging is set to false and do I need to set scroller="true" to make scroll to row work?
The Scroller docs indicate paging must be enabled with this comment:
Yes,
row().scrollTo()
is a Scroller extension API. It looks like that is the problem with @puffster 's code. The Scroller extension was loaded but doesn't look like it was enabled.Kevin
@kthorngren Is there any way to scroll to specific row without setting scroller=true?
Hi @velagac ,
No,
row().scrollTo()
needs scroller. This SO thread looks there's an alternative solution for you,Cheers,
Colin
@colin, thanks. Just used similar solution to fix my problem.