
JS function for reactable row details with exclusions and card styling (Generated by Claude Opus 4.6 with some manual tweaks)
Source:R/render_table.R
build_rt_row_details.RdBuild JavaScript function for reactable row details Generates a JS function that can be used in reactable's .details argument to (optionally) render additional details for each row when expanded. The function excludes specified primary columns, styling columns, and reactable internals from the details view, and formats the remaining key-value pairs as stacked cards with uppercase labels and values below.
Usage
build_rt_row_details(
primary_cols,
styling_cols = c("CLINVAR_CLASSIFICATION", "TISSUE_ASSOC_RANK", "GLOBAL_ASSOC_RANK",
"CODING_STATUS"),
font_size = "0.94em"
)Arguments
- primary_cols
Character vector of primary column names to exclude from details
- styling_cols
Character vector of column names used for styling (e.g. "CLINVAR_CLASSIFICATION", "TISSUE_ASSOC_RANK", etc.) to exclude from details
- font_size
CSS font-size string applied to the detail card values (default: "0.94em")