Shiny downloadButton does not fit into the sidebarPanel

Hi there,

I am struggling with downloadButton in shiny. It's not fitting itself into the sidebarPanel. I'm sure I'm missing something here. I want to use fluidRow >> column architecture. But it's not working with this. However, when I use sidebarLayout instead of fluidRow >> column it works fine.

Any help will be highly appreciated.
Thanks.

library(shiny)

ui = fluidPage(

    
    h1("Test"),
    
    br(),
    fluidRow(
    # sidebarLayout(
    column(6,
    sidebarPanel(
        
        selectizeInput("cyl",
                       label = "Cylinder" ,
                       choices = unique(mtcars$cyl),
                       selected = NULL
        ),
        
        
        
        downloadButton("report", "Generate report for selected"),
        br(),br(),
        downloadButton("reportall", "Generate report for all")
        
    )
    ),
    column(6,
    mainPanel(
        
        DT::dataTableOutput('myTable1')
        
    )
    )
    )
    
    # )
)



server <- function(input, output) {

   output$myTable1 <- DT::renderDataTable({
       mtcars %>% filter(cyl == input$cyl)
   })
}


shinyApp(ui = ui, server = server)

Sorry about the code. It looks terrible.

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.