Merge pull request #2529 from aignatov-bio/ai-sci-4584-fix-handsone-table

Fix Handson table for collapsed protocol section [SCI-4584]
This commit is contained in:
aignatov-bio 2020-05-05 12:58:04 +02:00 committed by GitHub
commit f3046c8515
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -472,6 +472,16 @@ function updateRecentProtocolsStatus() {
}
}
function initProtocolSectionOpenEvent() {
$('#protocol-container').on('shown.bs.collapse', function() {
$(this).find("[data-role='hot-table']").each(function() {
var $container = $(this).find("[data-role='step-hot-table']");
var hot = $container.handsontable('getInstance');
hot.render();
});
});
}
/**
* Initializes page
*/
@ -485,6 +495,7 @@ function init() {
refreshProtocolStatusBar();
initImport();
initRecentProtocols();
initProtocolSectionOpenEvent();
}
init();