Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
columnSelector: don't use deprecated scoped style
  • Loading branch information
HendrikSchultheis committed Jan 9, 2018
1 parent a95c0cc commit 7777d24
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/columnSelector.R
Expand Up @@ -13,7 +13,8 @@ columnSelectorUI <- function(id, label = F, title = NULL) {

shiny::tagList(
shiny::tags$b(title),
shiny::HTML("<style scoped> div.selectize-input:not(.has-items) {background: #FFFFE1;} </style>"),
shinyjs::useShinyjs(),
shiny::singleton(shiny::tags$head(shiny::tags$link(rel = "stylesheet", type = "text/css", href = "wilson_www/styles.css"))),
shiny::uiOutput(ns("out")),
{if(label) shiny::uiOutput(ns("showLabel"))}
)
Expand Down Expand Up @@ -78,9 +79,10 @@ columnSelector <- function(input, output, session, type.columns, type = NULL, co
if(multiple) {
columnSelectLabel = paste0(columnSelectLabel, "(s)")
}

shiny::tagList(
shiny::selectInput(session$ns("select.type"), label = columnTypeLabel, choices = type.r(), selected = type.r()[1], multiple = FALSE),
shiny::selectizeInput(session$ns("select.column"), label = columnSelectLabel, choices = choices, multiple = multiple)
shiny::div(shiny::selectizeInput(session$ns("select.column"), label = columnSelectLabel, choices = choices, multiple = multiple), class = "empty") # colored background if empty
)
})

Expand Down
4 changes: 4 additions & 0 deletions inst/www/styles.css
Expand Up @@ -100,3 +100,7 @@
}

/* text input */

.empty > div .selectize-input:not(.has-items) {
background: #FFFFE1;
}

0 comments on commit 7777d24

Please sign in to comment.