Skip to content

Commit

Permalink
Fix table not rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
pixup1 committed Dec 11, 2024
1 parent 01dd9a1 commit ad44209
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions R/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,18 @@ server <- function(input, output) {
filtered_data
})

output$vis_table <- reactive({
output$vis_table <- renderTable(
{
filtered_data()[, !grepl("^Aff", names(filtered_data()))]
},
striped = TRUE
)

output$vis <- renderUI({
if (is.null(input$file)) {
HTML('<div style="display: flex; justify-content: center; align-items: center; height: 100vh; font-weight: bold;">Veuillez charger un fichier pour commencer.</div>')
} else {
renderTable(
{
filtered_data()[, !grepl("^Aff", names(filtered_data()))]
},
striped = TRUE
)
tableOutput("vis_table")
}
})
}
2 changes: 1 addition & 1 deletion R/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ui <- page_sidebar(
navset_tab(
nav_panel(
"Visualisation v\u0153ux",
uiOutput("vis_table"),
uiOutput("vis"),
),
nav_panel(
"Sans r\u00E9ponse",
Expand Down

0 comments on commit ad44209

Please sign in to comment.