rstudio / rstudio/flexdashboard

Redrawing datatables in tabs or pages

Open
#140 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
848
Forks
298
PR merge metrics
No merged PRs in 30d

Description

When datatables in separate pages or tabs are controlled by Crosstalk, the datatables in unselected tabs do not get redrawn correctly, causing the column headers to get squished like this:

image

The issue doesn't seem to occur in Rmarkdown tabs, but this prevents using the sidebar to hold crosstalk control elements.

Here's a simple demo. First view both tabs, then select a Species and switch tabs to see the squashed headers. I'll post a reply with another demo showing the same thing seemingly working fine in Rmarkdown with tabs.

`---
title: "Tab Demo"
output:
flexdashboard::flex_dashboard


knitr::opts_chunk$set(echo = FALSE)
library(DT)
library(crosstalk)

iris_ct  <- SharedData$new(iris, group = "iris")

Sidebar {.sidebar}

filter_select(id = "Species", label = "Species", sharedData = iris_ct, group = ~Species)

Page 1

datatable(iris_ct)

Page 2

datatable(iris_ct)

`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Use the supplied flexdashboard R Markdown demo as the entry point: run it with DT and crosstalk, view both pages, filter Species, and switch tabs. Confirm the redraw behavior in each tab and compare it with the stated R Markdown-tabs case; done means the column headers remain correctly sized after filtering and tab switches.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, r
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.