Commit 68493698 authored by Jean-Karim Heriche's avatar Jean-Karim Heriche

Added notification when selecting a column as annotation column would change its type.

parent 80558ceb
......@@ -903,7 +903,12 @@ server <- function(input, output, session) {
observeEvent(input$annotationCol,{
if(!is.null(input$newCol) && !is.null(input$annotationCol) && input$newCol != "" && input$annotationCol != "") {
showNotification("Only one column can be used.", type ="error")
}
}
if(!is.null(input$annotationCol) && input$annotationCol != "" && !(class(rv$data[,input$annotationCol]) %in% c("character", "logical"))) {
showNotification("Annotation column must be of character type.
If you go ahead with this choice, the column type will be changed
which can cause problems (e.g. with plotting)", type ="error", duration = NULL)
}
})
observeEvent(input$annotateButton,{
......@@ -924,7 +929,7 @@ server <- function(input, output, session) {
}
}
if(is.null(rv$annotationLabels) || length(rv$annotationLabels) == 0) {
showNotification("Some labels must be provided.", type ="error")
showNotification("Some labels must be provided.", type ="error", duration = NULL)
} else {
# Move to the Explore tab
updateTabsetPanel(session, "menu", selected = "explore")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment