Skip to content

Commit

Permalink
fix: taxonomy card click
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Oct 25, 2023
1 parent 9873871 commit 591604c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
9 changes: 7 additions & 2 deletions src/taxonomy/taxonomy-card/TaxonomyCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,13 @@ const TaxonomyCard = ({ className, original, intl }) => {

return (
<>
<Card isClickable className={classNames('taxonomy-card', className)} data-testid={`taxonomy-card-${id}`}>
<Link className="stretched-link" to={`${id}`} aria-label="view taxonomy details" />
<Card
isClickable
as={Link}
to={`${id}`}
className={classNames('taxonomy-card', className)}
data-testid={`taxonomy-card-${id}`}
>
<Card.Header
title={name}
subtitle={getHeaderSubtitle()}
Expand Down
5 changes: 0 additions & 5 deletions src/taxonomy/taxonomy-card/TaxonomyCard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@
white-space: nowrap;
}

.pgn__card-header-actions, .badge {
z-index: 100;
position: relative;
}

.taxonomy-menu-item:focus {
/**
* There is a bug in the menu that auto focus the first item.
Expand Down
6 changes: 4 additions & 2 deletions src/taxonomy/taxonomy-card/TaxonomyCardMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ const TaxonomyCardMenu = ({
return (
<>
<IconButton
className="streched-link"
variant="primary"
onClick={() => setMenuIsOpen(true)}
onClick={(e) => {
e.preventDefault();
setMenuIsOpen(true);
}}
ref={setMenuTarget}
src={MoreVert}
iconAs={Icon}
Expand Down

0 comments on commit 591604c

Please sign in to comment.