Responsive doesn't work

Responsive doesn't work

mr_pablomr_pablo Posts: 1Questions: 1Answers: 0

I have a DT loading data via AJAX.

Responsive plugin it loaded, but fails to resize the table after loading the data, meaning a column at the end has "squished" content (couple of buttons that should sit horizontally, but display vertically, as there is not enough space)

However, if I resize my browser (Chrome) the responsiveness kicks in.

Sometimes I can go back to maximising the window and the last column will stay hidden in the responsive container, sometimes it doesn't and displays brokenly again.

Table tag

<table class="table table-striped dt-responsive nowrap compact" id="users" width="100%">

jQuery

$('#users').DataTable( {
"ajax": "<?php echo site_url('admin/users/get_users')?>",
"responsive": true,
"deferRender": true,
...
});

Screenshot attached showing last column issue (buttons are in a Bootstrap button group, so should sit horizontally next to each other) and also how it should look.

Answers

  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin

    Please link to a test case showing the issue. The screenshots show the issue, but they don't allow it to be debugged.

    Thanks,
    Allan

This discussion has been closed.