Skip to content

Instantly share code, notes, and snippets.

@pstorozenko
Created February 6, 2025 14:50
Show Gist options
  • Save pstorozenko/d7f36b2b059ce420d60ea6717c727927 to your computer and use it in GitHub Desktop.
Save pstorozenko/d7f36b2b059ce420d60ea6717c727927 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