-
Notifications
You must be signed in to change notification settings - Fork 81
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Dear @glin ,
I am currently facing challenges in setting appropriate widths for my multi-column tables. Despite numerous adjustments, I am not yet satisfied with the outcomes. My goal is to ensure that all column headers are clearly visible and that the widths are optimally suited for the content in each column. I have attempted to set a fixed table width and have sought advice from discussions on Stack Overflow, but the solutions have not been effective for my specific dataset.

columns = list(
id = colDef(name = "Cohort ID", sticky = "left"),
name = colDef(
name = "Cohort Name",
sticky = "left",
# Add a right border style to visually distinguish the sticky column
style = list(borderRight = "1px solid #eee"),
headerStyle = list(borderRight = "1px solid #eee")
),
cancer_type = colDef(name = "Cancer Type", minWidth = 50),
treatment = colDef(name = "Treatment"),
drug = colDef(name = "Drug"),
time = colDef(name = "Sampling Time", minWidth = 60),
N = colDef(name = "N", minWidth = 30),
year = colDef(name = "Year", minWidth = 40),
Label = colDef(name = "Label", minWidth = 30),
Surv = colDef(name = "Surv Info", minWidth = 60),
doi = colDef(name = "DOI", html = TRUE, cell = htmlwidgets::JS('
function(cellInfo) {
// Render as paper link
const url = `https://doi.org/${cellInfo.value}`
return `<a href="${url}" target="_blank">${cellInfo.value}</a>`
}
'))
)
Best,
Shixiang
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request