如何水平放置下拉列表和textInput

内维达·艾亚纳尔

我目前正在开发一个闪亮的应用程序。我在水平放置元素时遇到问题。

使用的RCode如下:

ui <- fluidPage( 
  fluidRow(
  column(3, 
         selectizeInput("proj1", NULL,
                        choices = Dummy$Project_1, width = "300px",
                        options = list(
                          placeholder = "Additional Projects",
                          onInitialize = I('function() { this.setValue(""); }')
                        )
         )),
  column(3, textAreaInput("col11","", width = "200px", height = "43px")),
  column(3, textAreaInput("col12","", width = "200px", height = "43px")),
  column(3, textAreaInput("col13","", width = "200px", height = "43px"))
)
)
server <- function(input, output){}

shinyApp(ui = ui, server = server)

输出如下:

在此处输入图片说明

谁能帮我解决这个问题?

拉胡尔·阿加瓦尔

在您的选择输入而不是 NULL 中,如果您提供一些标题,那么它将正常工作。下面是代码:

ui <- fluidPage( 
  fluidRow(
    column(3, 
           selectizeInput("proj1", "Choose value",
                          choices = c("A","B"), width = "300px",
                          options = list(
                            placeholder = "Additional Projects",
                            onInitialize = I('function() { this.setValue(""); }')
                          )
           )),
    column(3, textAreaInput("col11","", width = "200px", height = "43px")),
    column(3, textAreaInput("col12","", width = "200px", height = "43px")),
    column(3, textAreaInput("col13","", width = "200px", height = "43px"))
  )
)
server <- function(input, output){}

shinyApp(ui = ui, server = server)

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章