Skip to content

Commit

Permalink
feat: added modal_spinner to export data button
Browse files Browse the repository at this point in the history
  • Loading branch information
selkamand committed Nov 27, 2023
1 parent 4eea4db commit 44488eb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/mod_external_tools.R
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,16 @@ mod_external_tools_server <- function(id, maf_data_pool){
#Download
output$out_downloadbttn_exported_data <- downloadHandler(filename = filename, function(file){
validate(need(!is.null(maf()), message = "Please select a dataset ... "))
shinybusy::show_modal_spinner(text = "Importing your data ...", session = session)
conversion_function = external_tools_get_property_by_tool_name(tool_name = tool_name(), property_to_retrieve = "maf_conversion_function")
requires_gene_name = external_tools_get_property_by_tool_name(tool_name = tool_name(), property_to_retrieve = "requires_gene_selection")

if(requires_gene_name)
conversion_function(maf_dataset_wrapper(), file, selected_gene())
else
conversion_function(maf_dataset_wrapper(), file)

shinybusy::remove_modal_spinner(session = session)
})

})
Expand Down

0 comments on commit 44488eb

Please sign in to comment.