Skip to content

Bug: DataTable was not responsive on window resize #146

Description

@LackFos

DataTable was not responsive on window resize, my DataTable was broken after i migrated it from v1.13.0 to v2.1.8. you can see it on https://youtu.be/8x7ezmTDig8.

This happend because this commit remove resize.dtr event listener for conditionally set the column visibility when window resized

My current workaround in my project:

$(window).on(
    "resize.dtr",
    DataTable.util.throttle(function () {
        $(".dataTable").DataTable().responsive.recalc();
    }),
);

My suggestion was to re-add resize.dtr back to global event listenr

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions