Skip to content

Instantly share code, notes, and snippets.

@pstorozenko
Created February 6, 2025 15:01
Show Gist options
  • Save pstorozenko/38cc01531c9c9c77aa2264b734ed611f to your computer and use it in GitHub Desktop.
Save pstorozenko/38cc01531c9c9c77aa2264b734ed611f to your computer and use it in GitHub Desktop.
Generated by Flow
# Interactive Table Components
# Created by RGistGenerator
flow.module <- local({
# Required Libraries
require(shiny)
require(DT)
# Component Functions
list(
interactiveTableUI_flow = function(id) {
tagList(
DTOutput(NS(id, "table"))
)
},
interactiveTableServer_flow = function(id, data) {
moduleServer(id, function(input, output, session) {
output$table <- renderDT({
datatable(data(), options = list(
pageLength = 10,
autoWidth = TRUE,
searching = TRUE,
ordering = TRUE,
lengthChange = TRUE
))
})
})
}
)
})
flow.module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment