Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
pca: disable plot button on start
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikSchultheis committed Mar 9, 2018
1 parent efcf416 commit bf06662
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/pca.R
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ pca <- function(input, output, session, data, types, levels = NULL, entryLabel =
}
}
})

# handle reactive sizes
size <- shiny::reactive({
width <- ifelse(shiny::is.reactive(width), width(), width)
Expand Down Expand Up @@ -171,9 +172,12 @@ pca <- function(input, output, session, data, types, levels = NULL, entryLabel =
shiny::selectInput(session$ns("select"), label = "select data level", choices = unique(levels.r()))
})

#update dimension inputs
# disable plot button on init
shinyjs::disable("plot")
# update dimension inputs
shiny::observe({
col.num <- length(shiny::req(columnSelect$selectedColumns()))

if(col.num < 3 || nrow(shiny::isolate(data.r())) < 3 || is.na(input$dimA) || is.na(input$dimB)){
shinyjs::disable("plot")

Expand Down

0 comments on commit bf06662

Please sign in to comment.