Skip to content

Bug: DataTable was not responsive on window resize #146

@LackFos

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions