如何添加另一行pickerinputs?
我试图通过pickerinputs获取数据,我成功地创建了第一行,但当我尝试创建另一个如何添加另一行pickerinputs?,r,R,我试图通过pickerinputs获取数据,我成功地创建了第一行,但当我尝试创建另一个fluidRow()并将相同的代码粘贴到其中时。它不起作用。只显示我以前创建的一行。 怎么解决呢??我正在提供此模块的代码。 我试图从differentpickerinput()获取相同的数据,这意味着将有两行获取相同的数据 需要代码方面的帮助, 万分感谢 # previous name: rmaRenderMainFiltersModuleUI <- function(id) { rm
fluidRow()
并将相同的代码粘贴到其中时。它不起作用。只显示我以前创建的一行。
怎么解决呢??我正在提供此模块的代码。
我试图从differentpickerinput()
获取相同的数据,这意味着将有两行获取相同的数据
需要代码方面的帮助,
万分感谢
# previous name: rmaRenderMainFiltersModuleUI <- function(id) {
rma_main_filters_ui <- function(id) {
ns <- shiny::NS(id) # create namespace
#first row
fluidRow(
column(
2,
div(
class = "dropdown",
shiny::htmlOutput(
ns("render_new1")
)
)
),
column(
2,
div(
class = "dropdown",
shiny::htmlOutput(
ns("render_new2")
)
)
),
column(
2,
div(
class = "dropdown",
shiny::htmlOutput(
ns("render_new3")
)
)
),
column(
2,
div(
class = "dropdown",
shiny::htmlOutput(ns(
"render_new4"
))
)
),
column(
2,
div(
class = "dropdown",
shiny::htmlOutput(ns(
"render_new5"
))
)
)
)
#second row
fluidRow(
column(
2,
div(
class = "dropdown",
shiny::htmlOutput(
ns("render_Status")
)
)
),
column(
2,
div(
class = "dropdown",
shiny::htmlOutput(
ns("render_Family")
)
)
),
column(
2,
div(
class = "dropdown",
shiny::htmlOutput(
ns("render_RMA")
)
)
),
column(
2,
div(
class = "dropdown",
shiny::htmlOutput(ns(
"render_SN"
))
)
),
column(
2,
div(
class = "dropdown",
shiny::htmlOutput(ns(
"render_Customer"
))
)
)
)
}
# render main filters
# previous name: rmaRenderMainFiltersModuleServer
rma_main_filters <-
function(input, output, session) {
#data to be fetched to the 2nd row
output$render_Status <- renderUI({
pickerInput(
inputId = session$ns("Status"),
label = "Status",
choices = status_unique,
choicesOpt = list(style = rep(
"font-size: 80%", length(status_unique)
)),
options = list(
`actions-box` = TRUE,
size = 15,
`selected-text-format` = "count > 3",
width = "auto"
),
multiple = TRUE,
selected = c(
"2nd Level Failure Analysis",
"Corrective Actions",
"Disposition",
"Failure Analysis",
"Failure Verification",
"Other",
"Outbound Logistics"
)
)
})
output$render_Family <- renderUI({
pickerInput(
inputId = session$ns("Family"),
label = "Product Family",
choices = family_unique,
choicesOpt = list(style = rep(
"font-size: 80%", length(family_unique)
)),
options = list(
`actions-box` = TRUE,
size = 15,
`selected-text-format` = "count > 4",
width = "auto"
),
multiple = TRUE,
selected = NULL
)
})
output$render_RMA <- renderUI({
pickerInput(
inputId = session$ns("RMA"),
label = "RMA#",
choices = rma_unique,
choicesOpt = list(style = rep("font-size: 80%", length(rma_unique))),
options = list(
`actions-box` = TRUE,
size = 15,
`selected-text-format` = "count > 6",
width = "auto",
`live-search` = TRUE
),
multiple = TRUE,
selected = NULL
)
})
output$render_SN <- renderUI({
pickerInput(
inputId = session$ns("SN"),
label = "SN",
choices = sn_unique,
choicesOpt = list(style = rep("font-size: 80%", length(sn_unique))),
options = list(
`actions-box` = TRUE,
size = 15,
`selected-text-format` = "count > 4",
width = "auto",
`live-search` = TRUE
),
multiple = TRUE,
selected = NULL
)
})
output$render_Customer <- renderUI({
pickerInput(
inputId = session$ns("Customer"),
label = "Customer",
choices = customer_unique,
choicesOpt = list(style = rep(
"font-size: 80%", length(customer_unique)
)),
options = list(
`actions-box` = TRUE,
size = 15,
`selected-text-format` = "count > 1",
width = "auto",
`live-search` = TRUE
),
multiple = TRUE,
selected = NULL
)
})
#data to be fetched to the 1st row
output$render_new1 <- renderUI({
pickerInput(
inputId = session$ns("Status"),
label = "Status",
choices = status_unique,
choicesOpt = list(style = rep(
"font-size: 80%", length(status_unique)
)),
options = list(
`actions-box` = TRUE,
size = 15,
`selected-text-format` = "count > 3",
width = "auto"
),
multiple = TRUE,
selected = c("Other"),
)
})
output$render_new2 <- renderUI({
pickerInput(
inputId = session$ns("Family"),
label = "Product Family",
choices = family_unique,
choicesOpt = list(style = rep(
"font-size: 80%", length(family_unique)
)),
options = list(
`actions-box` = TRUE,
size = 15,
`selected-text-format` = "count > 4",
width = "auto"
),
multiple = TRUE,
selected = NULL
)
})
output$render_new3 <- renderUI({
pickerInput(
inputId = session$ns("RMA"),
label = "RMA#",
choices = rma_unique,
choicesOpt = list(style = rep("font-size: 80%", length(rma_unique))),
options = list(
`actions-box` = TRUE,
size = 15,
`selected-text-format` = "count > 6",
width = "auto",
`live-search` = TRUE
),
multiple = TRUE,
selected = NULL
)
})
output$render_new4 <- renderUI({
pickerInput(
inputId = session$ns("SN"),
label = "SN",
choices = sn_unique,
choicesOpt = list(style = rep("font-size: 80%", length(sn_unique))),
options = list(
`actions-box` = TRUE,
size = 15,
`selected-text-format` = "count > 4",
width = "auto",
`live-search` = TRUE
),
multiple = TRUE,
selected = NULL
)
})
output$render_new5 <- renderUI({
pickerInput(
inputId = session$ns("Customer"),
label = "Customer",
choices = customer_unique,
choicesOpt = list(style = rep(
"font-size: 80%", length(customer_unique)
)),
options = list(
`actions-box` = TRUE,
size = 15,
`selected-text-format` = "count > 1",
width = "auto",
`live-search` = TRUE
),
multiple = TRUE,
selected = NULL
)
})
}
#以前的名称:RMARenderFiltersModuleUI