Guilherme Costa Guilherme Costa - 1 year ago 78
Javascript Question

Bug when next tab with JsGrid

why jsgrid presentation bug when i click at tab next? I try destroy e and raise the jsgrid and not solved.

$('a[href="#prestador"]').on('',function (e) {
createGrid('nota_prestador',data,'CPF/CNPJ TOMADOR');

enter image description here

Answer Source

Rendered in a hidden container (not opened tab in this case), js-grid cannot calculate size properly. So you have to call refresh on tab open event:

$('a[data-toggle="tab"]').on('', function (e) {

Checkout the issue on the project GitHub page: