Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider stretching hyperlinks #11

Open
cpsievert opened this issue May 3, 2021 · 3 comments
Open

Consider stretching hyperlinks #11

cpsievert opened this issue May 3, 2021 · 3 comments

Comments

@cpsievert
Copy link
Collaborator

cpsievert commented May 3, 2021

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

Screen Shot 2021-05-03 at 11 06 48 AM

@cpsievert
Copy link
Collaborator Author

cpsievert commented May 3, 2021

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/

@apreshill
Copy link
Contributor

this is a reactable table, will need to look into how to do this:
TanStack/table#206

@apreshill
Copy link
Contributor

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')
    }
    "
  )
  )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants