2017-11-27 12 views
1

私は現在、光沢のあるアプリを開発中です。要素を水平に配置する際に問題に直面しています。次のように使用ドロップダウンリストとテキストインプットを水平に配置する方法

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) 

出力は次のようになります。

enter image description here

誰もがこの問題で私を助けることができますか?

答えて

0

NULLの代わりにselectize入力で、いくつかのヘッダーを指定すると、正常に動作します。以下はコードです:

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) 
+0

または単に「値を選択」の代わりに「」を追加してください。 –

関連する問題