insightsengineering / insightsengineering/teal
[Feature Request]: Extend the header and footer for teal to include interactive elements
- Dominant language
- R
- Stars
- 263
- Forks
- 59
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 5
Description
### Feature description
Currently, it is not easy to create header and footer with custom server logic, one can only create static header and footers in teal easily.
The way to make them interactive is to manually modify the server function like this:
```r
library(teal)
app <- init(
data = teal_data(IRIS = iris, MTCARS = mtcars),
modules = modules(example_module()),
header = tags$div(actionButton("click_me", "Click Me!"), textOutput("click_count")),
footer = tags$div("Static footer")
)
body(app$server)[[length(body(app$server)) + 1]] <- quote(
output$click_count <- renderText({
paste("You clicked the button", input$click_me, "times")
})
)
shinyApp(app$ui, app$server)
```
It will be nice if we can provide the server logic in an easy way so we can create header and footers with interactivity.
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct.
### Contribution Guidelines
- [X] I agree to follow this project's Contribution Guidelines.
### Security Policy
- [X] I agree to follow this project's Security Policy.
Contributor guide
Assessment
This issue has not been assessed yet.