Converts a data frame into a tagList of <tr> elements, one per row.
Designed to be used as a fragment endpoint response — the output replaces
a <tbody> via htmx swap.
Value
A htmltools::tagList of <tr> tags.
Examples
df <- data.frame(cut = c("Fair", "Good"), price = c(326L, 400L))
hx_table_rows(df, columns = c("cut", "price"))
#> <tr>
#> <td>Fair</td>
#> <td>326</td>
#> </tr>
#> <tr>
#> <td>Good</td>
#> <td>400</td>
#> </tr>
# With CSS classes on specific columns
hx_table_rows(df, col_classes = list(price = "text-end fw-bold"))
#> <tr>
#> <td>Fair</td>
#> <td class="text-end fw-bold">326</td>
#> </tr>
#> <tr>
#> <td>Good</td>
#> <td class="text-end fw-bold">400</td>
#> </tr>
