rstudio / shinydashboard

Shiny Dashboarding framework
https://rstudio.github.io/shinydashboard/
Other
893 stars 299 forks source link

Focus when clicking on selectize box #81

Open YvesCR opened 9 years ago

YvesCR commented 9 years ago

Hello,

I have an issue with selectizeInput inside shinydashboard inside panel.

when I click, the page focus on the top of the app. I would like to get rid of this focus, that the page doesn't move when I click. The result is the same ever locally or on the server.

This doesn't happen in a classic shiny app. But with shinydashboard, it happens.

Is it possible to get ride of this effect?

My session:

sessionInfo() R version 3.1.1 (2014-07-10) Platform: x86_64-w64-mingw32/x64 (64-bit)

locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C [5] LC_TIME=English_United States.1252

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] googleVis_0.5.6 DiagrammeR_0.6 shinydashboard_0.4.0 lubridate_1.3.3 extrafont_0.17 [6] shiny_0.12.1 reshape2_1.4.1 brew_1.0-6 scales_0.2.4 ggplot2_1.0.1 [11] data.table_1.9.4

loaded via a namespace (and not attached): [1] Cairo_1.5-6 chron_2.3-45 colorspace_1.2-6 digest_0.6.8 extrafontdb_1.0 grid_3.1.1 [7] gtable_0.1.2 htmltools_0.2.6 htmlwidgets_0.4 httpuv_1.3.2 jsonlite_0.9.16 labeling_0.3 [13] magrittr_1.5 MASS_7.3-40 memoise_0.2.1 mime_0.3 munsell_0.4.2 plyr_1.8.2 [19] proto_0.3-10 R6_2.0.1 Rcpp_0.11.6 RJSONIO_1.3-0 rstudioapi_0.3.1 Rttf2pt1_1.3.3 [25] stringi_0.4-1 stringr_1.0.0 tools_3.1.1 xtable_1.7-4 yaml_2.1.13

My code:

### Allocation on the path depending on where the code is run, between servor and local :
if (interactive()) {
lib.path <- "C:/Users/user/Documents/R/win-library/3.1/"
} else {
lib.path <- "/usr/local/lib/R/site-library"
}

### packages ###
library(shiny, lib.loc =lib.path)
library(shinydashboard, lib.loc = lib.path)

############################### Beginning of the shiny app. server part ########################
server <-shinyServer(function(input, output) {

})

############################### Beginning of the shiny app. Interface part########################
ui <- dashboardPage(
dashboardHeader()
, dashboardSidebar(
sidebarMenu(
menuItem(h5("Methodology"), tabName = "methodology")
, menuItem(h5("Methodology2"), tabName = "meth2")
, menuItem(h5("Methodology3"), tabName = "meth3")
, menuItem(h5("Methodology4"), tabName = "meth4")
, menuItem(h5("Methodology5"), tabName = "meth5")
, menuItem(h5("Methodology6"), tabName = "meth6")
, menuItem(h5("Methodology7"), tabName = "meth7")
, menuItem(h5("Methodology8"), tabName = "meth8")
, menuSubItem(icon = NULL,
selectizeInput("country", "Country",
choices = c("United States", "United Kingdom", "other country"
, "other country2", "other country3", "other country4"), multiple = F,
width = '98%') )
)
)
, dashboardBody( tabItems(
tabItem(tabName = "methodology"
, box("nothing", width = 12, height = 2000) )
)
), title = "Fact Pack"
)
shinyApp(ui = ui, server = server) 

thanks

Rahul15 commented 9 years ago

You need to update to shinydashboard 0.5.0.

YvesCR commented 9 years ago

hi,

I have upgraded to the 0.5.0 version of shinydashboard and it doesn't change anything.

thanks.