带有 JQueryLayout 和 DT-table 的 Shiny-App 不工作

Shiny-App with JQueryLayout and DT-table not working

我正在尝试使用 JQuery-layouts(找到 here)和来自 shiny 的 htmlTemplate 函数创建一个应用程序。

目前唯一不起作用的是在中央窗格的第二个选项卡上显示 DT-Table。尝试使用普通闪亮 table (renderTable/tableOutput) 时问题仍然存在。

这个div有,但是没有table出现:

<div id="histoTable1" style="width:100%; height:auto; " class="datatables html-widget html-widget-output shiny-bound-output"></div>

我需要指定一些 I/O-bindings 吗?或者我错过了什么?


应用程序可以通过 here 和 运行 下载:

library(shiny)
runGitHub(repo = "jQueryLayout", username = "trafficonese")

基于这个answer,我设法弄明白了:

头部缺少一个简短的 javascript 片段,它正在侦听点击事件,然后触发 "shown"。

<script>
    $(document).on("click", "li.tabCenter a", function() {
        $(this).trigger("shown");
    });
</script> 

github-示例现在工作正常并且两个表都出现了。