Skip to content

Vertical alignment of cells when other columns contain multiple lines #142

@py9mrg

Description

@py9mrg

Hello,

I can't work out a way to align cells vertically (i.e. the contents in the middle) when other columns contain entries that span multiple lines. I've tried, colDef, CSS, html within the cells, everything. It all seems to work within each line of the cell and not across the full cell. If that makes sense? Compare the two results below (ignore horizontal alignment), hopefully it makes more sense:

test_tbl <- tibble::tibble(a = c("really really really really really really long entry"), b = rep("short"))

library(reactable)
reactable(test_tbl,
          columns = list(a = colDef(width = 200), a = colDef(width = 200)))

library(DT)
datatable(test_tbl,
          options = list(columnDefs = list(list(width = '200px', targets = c(1, 2)))))

Created on 2021-04-10 by the reprex package (v2.0.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions