[英]Shiny-App with JQueryLayout and DT-table not working
我正在尝试使用JQuery-layouts (在此处找到)和发亮的htmlTemplate
函数创建一个应用程序。
目前唯一不起作用的是在中间窗格的第二个选项卡上显示DT表。 尝试使用普通的闪亮表(renderTable / tableOutput)时,问题仍然存在。
该div存在,但没有表格出现:
<div id="histoTable1" style="width:100%; height:auto; " class="datatables html-widget html-widget-output shiny-bound-output"></div>
我是否需要指定一些I / O绑定? 还是我想念什么?
该应用程序可以在此处运行并通过以下方式运行:
library(shiny)
runGitHub(repo = "jQueryLayout", username = "trafficonese")
根据这个答案 ,我设法弄清楚了:
头部缺少一个简短的javascript代码段,该代码段正在侦听click事件,然后触发“显示”。
<script>
$(document).on("click", "li.tabCenter a", function() {
$(this).trigger("shown");
});
</script>
github-example现在运行良好,并且两个表都出现了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.