Datatable scroller with serverside not working with scrollY values like 400

Datatable scroller with serverside not working with scrollY values like 400

cyrilthomas1983cyrilthomas1983 Posts: 2Questions: 1Answers: 0

Hi Allan,

I have a Datatable scroller configuration with
serverside:true,
scrollY: "400px"
scroller: true

But while scrolling the table the ajax call to fetch data is not getting triggered.
If I change the scrollY value to 200px it works.

My table height has to adjust to the screenheight and 200px will look very small

For now
I achieved this by a workaround
setting scrollY to 200
When data loads after a 1 sec(1000ms) interval I am setting height of the table to adjust with the screen

Need your thoughts on a solution for this

--

Answers

  • colincolin Posts: 15,177Questions: 1Answers: 2,590

    It's working as expected here, so it must be something with your configuration. We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • cyrilthomas1983cyrilthomas1983 Posts: 2Questions: 1Answers: 0
    edited October 2021

    Thanks for your reply.
    I will create the test case. It might take sometime. I will do it as soon as possible.
    Meanwhile can you clear the query below
    But why doesnt it work with scrollY as 400px

    --
    Cyril

  • kthorngrenkthorngren Posts: 20,425Questions: 26Answers: 4,794

    I took the example Colin linked and change to scrollY: "400px". Looks like it works properly with scrollY: "400px".
    http://live.datatables.net/tayafela/1/edit

    Are you loading the scroller extension JS and CSS?

    Meanwhile can you clear the query below
    But why doesnt it work with scrollY as 400px

    In order to help debug this issue we will need to see a link to your page or a test case showing the issue.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

Sign In or Register to comment.