Commit 180844be authored by Sandra Derozier's avatar Sandra Derozier
Browse files

ShinyJS - Show/Hide Buttons

parent e6af8667
......@@ -5,6 +5,7 @@ export(run_app)
import(shiny)
import(shinycssloaders)
import(shinydashboard)
import(shinyjs)
importFrom(DT,renderDT)
importFrom(glue,glue)
importFrom(golem,with_golem_options)
......
......@@ -2,6 +2,7 @@
#' @importFrom DT renderDT
#' @importFrom phyloseq tax_table
#' @importFrom phyloseq.extended write_phyloseq
#' @import shinyjs
app_server <- function(input, output, session) {
# Load package data in the session (for testing purpose)
# data("physeq", package = "affiliationExplorer")
......@@ -9,7 +10,17 @@ app_server <- function(input, output, session) {
# data("otu_dictionary", package = "affiliationExplorer")
# List the first level callModules here
shinyjs::hide("clean")
shinyjs::hide("download")
output$tmptxt <- renderUI("Please upload your data (Biom file and MultiHits TSV file).")
observeEvent(input$tsv, {
shinyjs::show("clean")
shinyjs::show("download")
output$tmptxt <- renderUI("")
# Read the biom file --> phyloseq
biomfile <- read_frogs_biom(input$biom$datapath)
# Read the tsv file --> readr
......
#' @import shiny
#' @import shinycssloaders
#' @import shinydashboard
#' @import shinyjs
app_ui <- function() {
tagList(
# Leave this function for adding external resources
......@@ -26,11 +27,13 @@ app_ui <- function() {
# DashBooard Body
dashboardBody(
fluidPage(
useShinyjs(),
fluidRow(
box(title = "Affiliation selection",
width = NULL,
status = "primary",
solidHeader = T,
htmlOutput("tmptxt"),
htmlOutput("txt"),
HTML("<br/>"),
DT::DTOutput("table"),
......
......@@ -21,6 +21,7 @@ usethis::use_package( "phyloseq" ) # To call each time you need a new package
usethis::use_package( "biomformat" )
usethis::use_package( "dplyr" )
usethis::use_package( "tidyr" )
usethis::use_package("shinyjs")
## Github dependencies
usethis::use_dev_package("phyloseq.extended")
......
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