Merge pull request #3413 from rstudio/feature/selectize-dropdown-parent-body

Set selectize dropdownParent to "body" to prevent clipping
This commit is contained in:
Winston Chang
2021-06-15 11:50:37 -05:00
committed by GitHub

View File

@@ -208,6 +208,15 @@ selectizeIt <- function(inputId, select, options, nonempty = FALSE) {
options$plugins <- c(options$plugins, list('selectize-plugin-a11y'))
}
# to prevent clipping of the selectize drop-down we set the dropdownParent
# to "body". This might be necessary if e.g. overflow-x: scroll is set
# on it's container, which forces overflow-y to 'auto' (as per
# https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-y). Discussion
# of usage here: https://github.com/selectize/selectize.js/issues/192
if (is.null(options$dropdownParent)) {
options$dropdownParent <- "body"
}
res <- checkAsIs(options)
deps <- list(selectizeDependency())