R/mod_actionLog.R

Defines functions mod_actionLog_server mod_actionLog_ui

#' actionLog UI Function
#'
#' @description A shiny Module.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
#' @noRd 
#'
#' @importFrom shiny NS tagList 
mod_actionLog_ui <- function(id){
  ns <- NS(id)
  
  fluidPage(
    fluidRow(
      column(
        width = 10, offset = 1,
        DT::dataTableOutput(ns("action_log"))
      )
    )
  )
}

#' actionLog Server Functions
#'
#' @noRd 
mod_actionLog_server <- function(id, action_log){
  moduleServer( id, function(input, output, session){
    ns <- session$ns
    output$action_log <- DT::renderDataTable(action_log(), 
                                             selection = 'none',
                                             rownames = F,
                                             escape = F,
                                             options = list(paging=FALSE, columnDefs = list(list(width = '180px', targets = c(0,1)))))
  })
}
ChrKoenig/VegXshiny documentation built on March 23, 2024, 7:29 a.m.