Open cpsievert opened 3 years ago
Might be able to do this with a CSS trick similar to Bootstrap's stretched link https://getbootstrap.com/docs/5.0/helpers/stretched-link/
this is a reactable table, will need to look into how to do this: https://github.com/tannerlinsley/react-table/issues/206
Thanks to @jthomasmock I believe this is a possible solution:
tibble(
x = 1:5,
y = letters[1:5],
url = rep("http://www.google.com", 5)
) %>%
reactable(
onClick = JS("function(rowInfo, colInfo, index) {
window.open(rowInfo.row['url'], '_blank')
}
"
)
)
The hover styles on the table row suggest that the whole row is clickable, but only the hyperlink in the reference column will take you to the website