【发布时间】:2018-04-15 14:53:17
【问题描述】:
我在格式化一行动态输入时遇到问题。每当我将 checkboxInput 作为fluidRow 的一部分时,它都会跳转到新行,而不是将操作按钮直接放在复选框的右侧。知道我做错了什么吗?
这是当前代码:
#Dynamic UI based on how many cohorts exist;
cohort_ui = eventReactive(c(input$save_cohort, input$reset_cohorts, input$delete_cohort1, input$delete_cohort2), {
bootstrapPage(
strong("Combine Cohorts"),
lapply(1:length(names(cohorts)), function(i) {
fluidRow(column(width = 12, checkboxInput(paste0("active_cohort",i), label = names(cohorts)[i], value = FALSE),
actionButton(paste0("delete_cohort",i), "Delete"), actionButton(paste0("rename_cohort",i), "Rename"),
textInputRow(paste0("rename_cohort_text",i), label= NULL, placeholder = "Enter new cohort name")))
}),
radioButtons("join_cohorts", label = "Join Operation", choices = c("Union", "Intersection", "Difference"), selected = NULL),
textInput("join_cohorts_name", label = "New Cohort Name", value = "", width = NULL, placeholder = NULL),
actionButton("join_cohorts_save", "Save")
)
})
output$cohort_ui = renderUI({cohort_ui()})
【问题讨论】:
标签: r user-interface shiny