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. The problem also remains when trying to use a normal shiny table (renderTable/tableOutput).

The only thing that is not functioning for now is displaying a DT-Table on the second Tab in the center pane.

  • On the tab "Graph" a plotly barchart and a DT-table appear. (works correctly)
  • On the tab "Tabelle" another DT-table should also appear. (doesnt work)

This div is there, but no table:

<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? 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".

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

The github-example is working fine now and both tables appear.

1 Like