validateCssUnit(width) for selectize and slider

This commit is contained in:
Yihui Xie
2014-05-17 01:32:01 -05:00
parent 18e85c32b4
commit f8b38e4683
2 changed files with 2 additions and 2 deletions

View File

@@ -766,7 +766,7 @@ selectizeIt <- function(inputId, select, options, width = NULL, nonempty = FALSE
type = 'application/json',
`data-for` = inputId, `data-nonempty` = if (nonempty) '',
`data-eval` = if (length(res$eval)) HTML(toJSON(res$eval)),
`data-width` = width,
`data-width` = validateCssUnit(width),
if (length(res$options)) HTML(toJSON(res$options)) else '{}'
)
),

View File

@@ -113,7 +113,7 @@ slider <- function(inputId, min, max, value, step = NULL, ...,
'data-skin'='plastic', 'data-round'=round, 'data-locale'=locale,
'data-format'=format, 'data-scale'=ticks,
'data-smooth'=FALSE,
'data-width'=width
'data-width'=validateCssUnit(width)
),
dep
)