Skip to contents

Build 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")

Value

A JavaScript function as a string that can be passed to reactable's .details argument to render row details with the specified exclusions and formatting.