Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

render_semantic_report_ui prevents side scrolling for DT tables #85

Open
1 task done
nick-youngblut opened this issue Aug 28, 2023 · 0 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@nick-youngblut
Copy link

Guidelines

  • I agree to follow this project's Contributing Guidelines.

Project Version

0.2.0

Platform and OS Version

macOS 13.3

Existing Issues

No response

What happened?

Once the validation report is rendered in a shiny app, the user cannot side scroll for DT tables with many columns. It appears that rendering of the report fixes the webpage size and prevents any side scrolling. This occurs even if the DT table and report are on different tab panels.

Steps to reproduce

Relevant server.R code:

library(shiny)
library(data.validator)
library(DT)

server = function(input, output, session) {
  # skipped lines...

  report = reactive({
    req(tbl())
    report = data_validation_report()
    validate(tbl(), name = "Verifying samples table") %>%
      validate_if(is_uniq(Sample_ID), 
                  description = "Sample ID column is unique") %>%
      validate_cols(not_na, 
                    description = "No NA values") %>%
      add_results(report)
    return(report)
  })
  ## render report
  output$validation = renderUI({
    req(report())
    render_semantic_report_ui(get_results(report()))
  })
}

Relevant ui.R code:

library(shiny)
library(data.validator)
library(DT)

ui = fluidPage(
  tabsetPanel(
    tabPanel('Data Input',
      fileInput("samples_file", "Samples file", 
              accept=c(".csv", ".tsv", ".xlsx")),
      actionButton("submit_button", "Submit"),
    ),
    tabPanel('Samples table',
      dataTableOutput('samples_table')
    ),
    tabPanel('Table validation',
      uiOutput("validation")
    )
  )
)

Expected behavior

I would like to render the validation report but still be able to side scroll through all columns in the DT table that is rendered in the app.

Attachments

No response

Screenshots or Videos

No response

Additional Information

No response

@nick-youngblut nick-youngblut added the bug Something isn't working label Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant