Skip to content

Commit

Permalink
Allow row click when onClick is passed in
Browse files Browse the repository at this point in the history
  • Loading branch information
sydturn committed Mar 19, 2024
1 parent 908897f commit 582b9eb
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,14 @@ export const Row = memo(function Row({
disabled && styles['TableRow-disabled'],
tone && styles[variationName('tone', tone)],
!selectable &&
!onClick &&
!primaryLinkElement.current &&
styles['TableRow-unclickable'],
);

let handleRowClick;

if ((!disabled && selectable) || primaryLinkElement.current) {
if ((!disabled && selectable) || onClick || primaryLinkElement.current) {
handleRowClick = (event: React.MouseEvent) => {
if (rowType === 'subheader') return;

Expand Down

0 comments on commit 582b9eb

Please sign in to comment.