formatting

This commit is contained in:
Andreas Gammelgaard Damsbo 2024-11-18 16:50:03 +01:00
parent 4e7af7d01f
commit 3590a9e216
No known key found for this signature in database
2 changed files with 13 additions and 14 deletions

View File

@ -32,6 +32,11 @@ server <- function(input, output, session) {
# return(!is.null(getData()))
# })
dd <- shiny::reactive({
shiny::req(input$ds)
v$file <- "loaded"
ds2dd_detailed(data = dat())
})
output$uploaded <- shiny::reactive({
if (is.null(v$file)) {
@ -43,12 +48,6 @@ server <- function(input, output, session) {
shiny::outputOptions(output, "uploaded", suspendWhenHidden = FALSE)
dd <- shiny::reactive({
shiny::req(input$ds)
v$file <- "loaded"
ds2dd_detailed(data = dat())
})
output$data.tbl <- gt::render_gt(
dd() |>
purrr::pluck("data") |>

View File

@ -19,17 +19,17 @@ ui <-
".ods"
)
),
shiny::actionButton(
inputId = "load_data",
label = "Load data",
icon = shiny::icon("circle-down")
),
# shiny::actionButton(
# inputId = "load_data",
# label = "Load data",
# icon = shiny::icon("circle-down")
# ),
shiny::helpText("Have a look at the preview panels to validate the data dictionary and imported data."),
# For some odd reason this only unfolds when the preview panel is shown..
# This has been solved by adding an arbitrary button to load data
# This has been solved by adding an arbitrary button to load data - which was abandoned again
shiny::conditionalPanel(
# condition = "output.uploaded=='yes'",
condition = "input.load_data",
condition = "output.uploaded=='yes'",
# condition = "input.load_data",
# shiny::helpText("Below you can download the dataset formatted for upload and the
# corresponding data dictionary for a new data base, if you want to upload manually."),
# Button