Guidelines
Project Version
0.4.3
Platform and OS Version
Ubuntu 22.04
Existing Issues
#39
What happened?
Tabset is not being rendered as described in #63
library(shiny)
library(shiny.semantic)
library(rhandsontable)
# Sample data for the tables
data1 <- data.frame(Name = c("John", "Alice", "Bob"), Age = c(28, 24, 22))
data2 <- data.frame(Product = c("A", "B", "C"), Price = c(10, 20, 30))
# UI
ui <- semanticPage(
title = "Example Issue 39",
textOutput("text"),
tabset(
id = "tabset",
tabs = list(
# Content of Tab 1
list(
menu = "tab_1",
content = tags$div(
class = "ui segment",
h1("Content of Tab 1"),
rHandsontableOutput("tab1_table")
),
id = "a_tab_1"
),
# Content of Tab 2
list(
menu = "tab_2",
content = tags$div(
class = "ui segment",
h1("Content of Tab 2"),
rHandsontableOutput("tab2_table")
),
id = "a_tab_2"
)
)
)
)
# Server
server <- function(input, output, session) {
# Content for Tab 1
output$tab1_table <- renderRHandsontable({
rhandsontable(data1)
})
# outputOptions(output, "tab1_table", suspendWhenHidden = FALSE)
output$tab2_table <- renderRHandsontable({
rhandsontable(data2)
})
# outputOptions(output, "tab2_table", suspendWhenHidden = FALSE)
output$text <- renderText({
paste(length(input$tab1_table), length(input$tab2_table))
})
}
# Run the app
shinyApp(ui = ui, server = server)
Steps to reproduce
Scenario 1 not working
- Run the example app submitted in the description
- Check that the numbers above the tabset being rendered are 3 0
Scenario 2 - Working example using outputOptions
- In the app provided in the description uncomment the lines in which
outputOptions is used
- Run the app
- Check that the numbers above the tabset are 3 3 (This indicates that the tables are being rendered appropriately)
...
Expected behavior
Tabset should render
Attachments
No response
Screenshots or Videos
No response
Additional Information
No response
Guidelines
Project Version
0.4.3
Platform and OS Version
Ubuntu 22.04
Existing Issues
#39
What happened?
Tabset is not being rendered as described in #63
Steps to reproduce
Scenario 1 not working
Scenario 2 - Working example using
outputOptionsoutputOptionsis used...
Expected behavior
Tabset should render
Attachments
No response
Screenshots or Videos
No response
Additional Information
No response