[英]Shiny-App with JQueryLayout and DT-table not working
I am trying to create an app using JQuery-layouts (found here ) and the htmlTemplate
function from shiny. 我正在尝试使用JQuery-layouts (在此处找到)和发亮的
htmlTemplate
函数创建一个应用程序。
The only thing that is not functioning for now is displaying a DT-Table on the second Tab in the center pane. 目前唯一不起作用的是在中间窗格的第二个选项卡上显示DT表。 The problem also remains when trying to use a normal shiny table (renderTable/tableOutput).
尝试使用普通的闪亮表(renderTable / tableOutput)时,问题仍然存在。
This div is there, but no table appears: 该div存在,但没有表格出现:
<div id="histoTable1" style="width:100%; height:auto; " class="datatables html-widget html-widget-output shiny-bound-output"></div>
Do I need to specify some I/O-bindings? 我是否需要指定一些I / O绑定? Or what am I missing?
还是我想念什么?
The app can be ound here and run via: 该应用程序可以在此处运行并通过以下方式运行:
library(shiny)
runGitHub(repo = "jQueryLayout", username = "trafficonese")
Based on this answer , I managed to figure it out: 根据这个答案 ,我设法弄清楚了:
A short javascript snippet was missing in the head, which is listening to the click event and then triggers a "shown". 头部缺少一个简短的javascript代码段,该代码段正在侦听click事件,然后触发“显示”。
<script>
$(document).on("click", "li.tabCenter a", function() {
$(this).trigger("shown");
});
</script>
The github-example is working fine now and both tables appear. github-example现在运行良好,并且两个表都出现了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.