I have a selectInput in a Shiny DT datatable. I needed to apply custom javascript to selectize the selectInput due to a formatting issue when using multiple = T
(see other post:
Here is a screenshot using the code above but commenting out the initComplete
line, showing the selectInput improperly formatted but vertically centered:
CodePudding user response:
Without the dummy selectize input, the selectize.js library is not included.
The CSS:
tags$head(tags$style(
HTML("td .form-group {margin-bottom: 0;} td .selectize-input {position: absolute; top: 50%; transform: translateY(-50%);} td .selectize-control {margin-bottom: 0;}")
)),