This repository has been archived by the owner on Jan 5, 2023. It is now read-only.
Table: Right click and double click row handlers #665
HaveSpacesuit
started this conversation in
Show and tell
Replies: 1 comment
-
Awesome, thanks for sharing here 👍 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was able to add right click and double click handlers on table rows using the built-in
rowProps
prop. Any prop which can be passed to anHTMLDivElement
may be passed into the table.A hook like this can be used to handle user interactions on rows, give them a test-id, or custom styling based on the original data item. A right click handler may be useful for a context menu. A double click handler may be useful for downloading an item, navigating into a folder structure, etc.
https://codesandbox.io/s/itwinui-react-minimal-example-forked-hlkq3p
Beta Was this translation helpful? Give feedback.
All reactions