Repository navigation
[EuiCard] Harden Click Event Criteria to Prevent Duplicate onClick Events - #6551
Conversation
…ed twice when clicking on a card title by creating a condition inside of outerOnClick to ensure the link does not contain a duplicate click event.
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6551/ |
Quick FYI for future PRs and QA - I'd suggest a |
Co-authored-by: Cee Chen <[email protected]>
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6551/ |
cee-chen
left a comment
There was a problem hiding this comment.
Woohoo, thanks for jumping on this Bree! ![]()
## Summary `[email protected]` ⏩ `[email protected]` ___ ## [`74.0.2`](https://github.com/elastic/eui/tree/v74.0.2) **Bug fixes** - Fixed `EuiCard` to ensure `onClick` method only runs once when `title` contains a React node ([#6551](elastic/eui#6551)) - Fixed `EuiSelectable` options with incorrect `aria-posinset` indices when rendered with group labels not at the start of the array ([#6571](elastic/eui#6571)) - Fixed a bug with `EuiSearchBar` where filters with `multiSelect: false` were not able to select a new option when an option was already selected ([#6577](elastic/eui#6577)) Co-authored-by: Kibana Machine <[email protected]>
## Summary `[email protected]` ⏩ `[email protected]` ___ ## [`74.1.0`](https://github.com/elastic/eui/releases/tag/v74.1.0) - Added new `EuiSkeletonText`, `EuiSkeletonTitle`, `EuiSkeletonCircle`, and `EuiSkeletonRectangle` components ([#6502](elastic/eui#6502)) - Updated `EuiSuperSelect` screen reader instructions to be more specific ([#6549](elastic/eui#6549)) - Added `error` and updated `alert` glyphs to `EuiIcon` ([#6550](elastic/eui#6550)) - All `EuiSkeleton` components now accept an `isLoading` flag and `children`, which automatically handles conditionally rendering loading skeletons vs. loaded content (`children`) ([#6562](elastic/eui#6562)) - All `EuiSkeleton` components now accept a `contentAriaLabel` prop, which more meaningfully describes the loaded content to screen readers ([#6562](elastic/eui#6562)) - Updated `EuiPopover` screen reader instructions for mobile and click behaviors ([#6567](elastic/eui#6567)) **Bug fixes** - Fixed `EuiCard` to ensure `onClick` method only runs once when `title` contains a React node ([#6551](elastic/eui#6551)) **Deprecations** - Deprecated `EuiLoadingContent` - use `EuiSkeletonText` instead ([#6557](elastic/eui#6557)) --------- Co-authored-by: Kibana Machine <[email protected]>
Fixes #6545
Summary
Resolved a bug that causes the
onClickmethod to be triggered twice when clicking on a card title by creating a condition inside ofouterOnClickto ensure the link does not contain a duplicate click event. Updated tests accordinglyQA
Testing:
src-docs/src/views/card/card_beta.tsx. Update the firstEuiCardinstance (line 13) to:Dashboards), you should find that the click event has only fired once, not twice.General checklist