Jsgrid: table is compressed

Created on 19 Jun 2015  路  4Comments  路  Source: tabalinas/jsgrid

I use the bootstap Tab component and in the first call of the site i get what is shown in the thumbnail below.
When i reload the page the table works fine.

error

help wanted

Most helpful comment

If rendered in invisible area grid cannot calculate sizes correctly, and the refresh is required.

Refresh the grid on tab opening:

$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
  $("#jsGrid").jsGrid("refresh");
});

If the tab is opened by default, just trigger event on ready:

$('a[data-toggle="tab"]:first').trigger("shown.bs.tab");

All 4 comments

If rendered in invisible area grid cannot calculate sizes correctly, and the refresh is required.

Refresh the grid on tab opening:

$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
  $("#jsGrid").jsGrid("refresh");
});

If the tab is opened by default, just trigger event on ready:

$('a[data-toggle="tab"]:first').trigger("shown.bs.tab");

Thanks this are working fine. :-D

You are welcome!

thanks tabalinas , you are so great. Also thanks Julian-B90 to write your problem. I ran into the same issue.

thank you two.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

am2222 picture am2222  路  4Comments

comiscienceknight picture comiscienceknight  路  3Comments

eliasuardi picture eliasuardi  路  3Comments

aidankilleen picture aidankilleen  路  5Comments

julmot picture julmot  路  3Comments