rstudio / rstudio/flexdashboard

autoWidth Rendering Garbled

Open
#291 2 comments 0 reactions 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

---
title: "autoWidth garbled"
output: flexdashboard::flex_dashboard
---

```{r}
library(tidyverse)
library(DT)
datatable(mtcars %>% as_tibble() %>% select(1:4), 
          options = list(autoWidth = TRUE,
                         columnDefs = list(list(width = '50px', 
                                                targets = "_all"))))
```

The code above is my first attempt at autoWidth within DT and flexdashboard. The code looks correct, yet the output is quite garbled (ie the column headings are not aligned with the column bodies). Tested in Chrome. I imagine IE and Safari won't fare much better. Version Info: [1] DT_0.16 flexdashboard_0.5.2

autowidth not working

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

Start by running the supplied R example with DT 0.16 and flexdashboard 0.5.2 in Chrome, then inspect how the autoWidth and columnDefs options affect the rendered table. Done means the column headings align with their column bodies in the dashboard.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.