Skip to content

Commit

Permalink
storage: Don't navigate when clicking on the mobile kebab
Browse files Browse the repository at this point in the history
Let's use the same trick as with the table: Don't put the navigation
handler on the whole card, but on all its children that should
navigate, and exclude the menu button.

Fixes #19897
  • Loading branch information
mvollmer committed Dec 13, 2024
1 parent ab2d7be commit 0e1392c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/storaged/pages.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -587,19 +587,21 @@ export const PageTable = ({ emptyCaption, aria_label, pages, crossrefs, sorted,

if (narrow) {
rows.push(
<Card key={key} onClick={onClick}
<Card key={key}
className={"ct-small-table-card" +
(page.location ? " ct-clickable-card" : null) +
(is_new ? " ct-new-item" : "")}
data-test-row-name={page.name}
data-test-row-location={page.columns[1]}>
<CardBody>
<Split hasGutter>
{ icon && <SplitItem>{icon}</SplitItem> }
<SplitItem isFilled><strong><Truncate content={name} /></strong>{info}</SplitItem>
{ icon && <SplitItem onClick={onClick}>{icon}</SplitItem> }
<SplitItem isFilled onClick={onClick}>
<strong><Truncate content={name} /></strong>{info}
</SplitItem>
<SplitItem>{actions}</SplitItem>
</Split>
<Split hasGutter isWrappable>
<Split hasGutter isWrappable onClick={onClick}>
<SplitItem>{type}</SplitItem>
<SplitItem isFilled>{location}</SplitItem>
<SplitItem isFilled className="pf-v5-u-text-align-right">{size}</SplitItem>
Expand Down

0 comments on commit 0e1392c

Please sign in to comment.