0

I am currently developing a shiny app and I face an issue with the dynamic alignment of the data table. The code used is

ui.R

shinyUI(fluidPage(
  dashboardPage(
  dashboardBody(
      tabItems(
        tabItem(tabName = "view_id",
                sidebarLayout(
                  sidebarPanel(width = 2, checkboxGroupInput("sidebar", "People Viewer",
                                                  sidebar_content)

                  ),
                  mainPanel(width=10,style ="background-color:RGB(255,255,255); border-color:RGB(255,255,255);align:left;",
                            wellPanel(DTOutput("tab") )
                  )
                )

        )

      )

    )))

server.R

shinyServer(function(input, output) {

 output$tab <- {

    renderDT(datatable(pep_view[ ,input$sidebar, drop = FALSE  ], filter = 'top', extensions = 'FixedColumns',
                       options = list(scrollX = TRUE,scrollY = "400px" ,fixedColumns = TRUE, pageLength = 10, autoWidth = TRUE
                       ), class = 'cell-border stripe')

    )
  }
})

The output obtained is enter image description here

Can anyone resolve this issue? Thanks in advance!!

  • Hi, the code produced isn't reproducible, please edit your question so that it is reproducible. Without going into the nitty-gritty details, my first intution is that it could be because of the app running in the console. Try the run `external tab` as mentioned in this [link] (https://stackoverflow.com/questions/35311318/opening-shiny-app-directly-in-the-default-browser). I hope this resolves it. – Ravi Krishna Sep 27 '18 at 15:30
  • If the code runs in the external tab, it results the same output – Nevedha Ayyanar Sep 27 '18 at 15:35

0 Answers0