Skip to content
Permalink
Browse files

Fixed bugs from changed wording

  • Loading branch information...
jenzopr committed Oct 14, 2019
1 parent d7911c3 commit 0693ff2123feed88a1bb76627e0bdcf53a976cd8
Showing with 6 additions and 6 deletions.
  1. +6 −6 wilson-basic/app.R
@@ -563,9 +563,9 @@ server <- function(session, input, output) {
output$fileLoader <- renderUI({
shiny::req(input$data_origin)

if (input$data_origin == "Examples") {
if (input$data_origin == "Select from list") {
return(selectizeInput(inputId = "fileLoader", label = "Select data set", choices = load, selected = input$fileLoader))
} else if (input$data_origin == "Upload") {
} else if (input$data_origin == "Upload file") {
return(fileInput(inputId = "fileLoader2", label = "Upload clarion file", accept = c(".se", ".clarion")))
}
})
@@ -574,19 +574,19 @@ server <- function(session, input, output) {
last_upload <- reactiveVal(value = "")
# returns filepath
file_path <- eventReactive({
if (isTruthy(input$fileLoader) && input$data_origin == "Examples") {
if (isTruthy(input$fileLoader) && input$data_origin == "Select from list") {
return(TRUE)
} else if (isTruthy(input$fileLoader2$datapath) && input$data_origin == "Upload" && input$fileLoader2$datapath != isolate(last_upload())) {
} else if (isTruthy(input$fileLoader2$datapath) && input$data_origin == "Upload file" && input$fileLoader2$datapath != isolate(last_upload())) {
last_upload(input$fileLoader2$datapath)

return(TRUE)
}
}, {
if (input$data_origin == "Examples") {
if (input$data_origin == "Select from list") {
shiny::req(input$fileLoader)

return(list(path = input$fileLoader, name = input$fileLoader))
} else if (input$data_origin == "Upload") {
} else if (input$data_origin == "Upload file") {
shiny::req(input$fileLoader2$datapath)

# copy for debugging

0 comments on commit 0693ff2

Please sign in to comment.
You can’t perform that action at this time.