avoid scrolling the table scroll.

avoid scrolling the table scroll.

arcanisgkarcanisgk Posts: 41Questions: 12Answers: 0
edited June 2021 in DataTables 1.10

after solving this:

https://datatables.net/forums/discussion/68707/strange-behavior-when-using-draw-or-columns-adjust

i am implementing:

.cell($taget).invalidate().draw();
.columns.adjust();

I have noticed that the table scrolls. automatically up, I have the property
"scrollY": "300px"

By using the aforementioned methods, can I prevent the table scrolling from being reset?

http://live.datatables.net/rojuwaxo/3/edit

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,443Questions: 26Answers: 4,974
    Answer ✓

    .cell($taget).invalidate().draw();

    Try passing false in the .draw() call, like this:

    .cell($taget).invalidate().draw(. false );
    .columns.adjust();
    

    See the draw() docs for more details.

    Kevin

Sign In or Register to comment.