Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sidebar on Phones #127

Closed
maxmoro opened this issue Feb 24, 2016 · 0 comments · Fixed by #204
Closed

Sidebar on Phones #127

maxmoro opened this issue Feb 24, 2016 · 0 comments · Fixed by #204
Assignees

Comments

@maxmoro
Copy link

maxmoro commented Feb 24, 2016

I noticed that if I use the with parameter in the dashboardSidebar command the left bar will not completely hide on phone screens.
example:

,dashboardSidebar(
                           sidebarMenu(id='tabs',menuItem("Filters",icon=icon("filter"), tabName='tab_parameters')
                                       ,menuItem("second",icon=icon("filter"), tabName='tab2',selected = T)) 
                           ,width='150px'
                       )

I fixed the issues Adding the following line on the style sheet :

.left-side, .main-sidebar {
       width: 100px;
}

Is this a bug or am I using the command in the wrong way?

Here a working example you can run from a phone or use the Chrome F12 feature (select any smartphone simulator)

library(shiny)
library(shinydashboard)
big_list=as.character(seq(1,3000))
shinyApp(
    ui = dashboardPage(title='Time Application'
                       #header
                       ,dashboardHeader(title=strong(h4("Time Application")),titleWidth='150px')
                       #left side tabs
                       ,dashboardSidebar(
                           sidebarMenu(id='tabs',menuItem("Filters",icon=icon("filter"), tabName='tab_parameters')
                                       ,menuItem("second",icon=icon("filter"), tabName='tab2',selected = T)) 
                           ,width='150px'
                       )
                       #body of the application, based on the tab
                       ,dashboardBody(
                           tabItems(
                               tabItem(tabName = 'tab_parameters'
                                       ,fluidRow(
                                           box(width=6,title='Filters'
                                               #remove dateRange input and  it works
                                               ,dateRangeInput("period"
                                                               , label ="Period"
                                                               , min  = '2013-01-01'
                                                               , max  = '2016-01-01'
                                                               , start = '2013-01-01'
                                                               , end = '2016-01-01'
                                               )
                                           )
                                       )
                                       ,fluidRow(width=12,box(status='success',title='Group By' 
                                                              ,selectizeInput( "OT_summary_criteria"
                                                                               , label =NULL
                                                                               , multiple=TRUE
                                                                               #, choices = c('a','b')
                                                                               ,choices=NULL
                                                                               #, selected ='a'
                                                                               #remove next line and it works
                                                                               , options=list(plugins = list('remove_button','drag_drop'))
                                                              )
                                       ))
                                       ,"You should see something here below if it works:"

                               )
                               ,tabItem(tabName = 'tab2'
                                       ,textOutput('infot')
                                       ,actionButton('test','test')
                               )
                           )
                       )
    )
    ,
    server =
        function(input, output, session) {
            output$infot = renderText( paste0('IT IS WORKING',input$OT_summary_criteria))
            observeEvent(input$test,updateSelectizeInput(session,'OT_summary_criteria',selected = '3000',choices=big_list,server=T))
        }
)
@maxmoro maxmoro changed the title Sider on Phones Side Bar on Phones Feb 25, 2016
@maxmoro maxmoro changed the title Side Bar on Phones Sidebar on Phones Feb 25, 2016
@wch wch added the targeted label Jan 26, 2017
bborgesr added a commit that referenced this issue Apr 21, 2017
…r is passed to dashboardSidebar() (fixes #177 and fixes #127)
@bborgesr bborgesr self-assigned this Apr 21, 2017
@wch wch closed this as completed in #204 Apr 21, 2017
wch pushed a commit that referenced this issue Apr 21, 2017
…r is passed to dashboardSidebar() (fixes #177 and fixes #127) (#204)
@wch wch removed the in progress label Apr 21, 2017
bborgesr added a commit that referenced this issue Apr 21, 2017
…r is passed to dashboardSidebar() (fixes #177 and fixes #127) (#204)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants