Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More than one datatable per page looks broken #15

Open
Ana06 opened this issue Dec 3, 2018 · 3 comments
Open

More than one datatable per page looks broken #15

Ana06 opened this issue Dec 3, 2018 · 3 comments

Comments

@Ana06
Copy link

Ana06 commented Dec 3, 2018

This is how my second table looks like using responsive:

image

@mkhairi
Copy link
Owner

mkhairi commented Dec 5, 2018

hi @Ana06, this issue may related with you css grid or something else.

@Ana06
Copy link
Author

Ana06 commented Feb 7, 2019

css grid? I don't think so, because the css is the same for the two tables and only the second one looks broken.

This is where I am using it: https://github.com/openSUSE/open-build-service/blob/master/src/api/app/views/webui2/webui/user/_involvement.html.haml

@mkhairi
Copy link
Owner

mkhairi commented Feb 7, 2019

@Ana06, owh just noticed your datatables in bootstrap tabs.
We need to call responsive.recalc() as well so Responsive also knows about the change

$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
      console.log( 'show tab' );
      $($.fn.dataTable.tables(true)).DataTable()
          .columns.adjust()
          .responsive.recalc();
 });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants