Skip to content

render_semantic_report_ui prevents side scrolling for DT tables #85

@nick-youngblut

Description

@nick-youngblut

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions