rstudio / rstudio/flexdashboard
Redrawing datatables in tabs or pages
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:

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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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