table.columns.adjust().draw() issue

table.columns.adjust().draw() issue

ImpPhilImpPhil Posts: 12Questions: 4Answers: 0

Possibly a bug. I'm periodically reloading data. On load complete if I call table.columns.adjust().draw() the current page is lost and the first page is displayed.

        function reloadData() {
            $('#loadingMessage').show();

            table.ajax.reload(archiveDataLoaded, false);
        }

        function archiveDataLoaded() {
            $('#loadingMessage').fadeOut(400);

            // Calling this makes table forget which page it's on
            //table.columns.adjust().draw();

        }

Replies

  • kthorngrenkthorngren Posts: 20,320Questions: 26Answers: 4,773

    Not a bug. You need to add the paging parameter as described in the draw() docs. Try table.columns.adjust().draw(false);

    Kevin

  • ImpPhilImpPhil Posts: 12Questions: 4Answers: 0

    Thanks again.

This discussion has been closed.