This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shinyjs) | |
library(shiny) | |
library(purrr) | |
library(stringr) | |
library(glue) | |
#' Remove element named "id" from a list | |
remove_id_element <- function(x){ | |
x$id = NULL | |
x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(DT) | |
library(dplyr) | |
ui <- fluidPage( | |
fluidRow( | |
textOutput("processStatus") | |
), | |
fluidRow(DTOutput("myTable")) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(DT) | |
library(dplyr) | |
ui <- fluidPage( | |
DTOutput("myTable") | |
) | |
server <- function(input, output, session){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(DT) | |
library(dplyr) | |
ui <- fluidPage( | |
DTOutput("myTable") | |
) | |
server <- function(input, output, session){ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The div we've manually created, with a class of 'outerDivClassName' | |
which contains the scrollbar we want to watch. In the CSS, give | |
this class the property "overflow: auto;", so that a scrollbar appears | |
when its contents are too large to fit inside. | |
*/ | |
const scrollBox = document.querySelector('.outerDivClassName'); | |
function scrollHeaderFunc(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Nested modules - note that when something in the parent module is updated, | |
# only the elements of the child module which had reactive dependencies will | |
# update. | |
# | |
# * Examine what is updated when we click the "show row numbers" checkbox | |
# * Now examine when the data_count output is updated. | |
library(shiny) | |
library(DT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adapted from https://stackoverflow.com/questions/48592056/shiny-reactivity-not-working-in-submodules | |
library(shiny) | |
library(DT) | |
filtersUI <- function(id) { | |
ns <- NS(id) | |
selectizeInput( | |
ns("Species"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).keyup(function(event) { | |
if ((event.keyCode == 13) && (document.activeElement.id == "login_password")) { | |
$("#login_button").click(); | |
} | |
}); |