From 596414d4c90355de00a2f45293c12653e40b7718 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 30 Sep 2020 11:17:15 +0200 Subject: JS: fix table header refresh for datatable behind tab or modal --- .../templates/ishtar/blocks/window_tables/dynamic_documents.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html') diff --git a/ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html b/ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html index a9e58f3e8..ff92b8af9 100644 --- a/ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html +++ b/ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html @@ -80,7 +80,11 @@ setTimeout( $('#modal_grid_{{name}}').on('show.bs.modal', function (e) { $('#grid_{{name}}_wrapper').appendTo( '#modal_grid_{{name}} .modal-body .current-grid'); - $('#grid_{{name}}').DataTable().clear().draw() + $('#grid_{{name}}').DataTable().clear().draw(); + setTimeout(function(){ + $('#modal_grid_{{name}} .modal-body').resize(); + }, 500); // fix table header refresh for datatable + }); $('#modal_grid_{{name}}').on('hide.bs.modal', function (e) { -- cgit v1.2.3