Skip to content

[EuiCard] title Prop Causing onClick to Trigger Twice When Clicked #6545

@breehall

Description

@breehall

The title prop on EuiCard is causing the onClick method to trigger twice when the title is clicked. It appears that this only happens when a React Node is passed into title instead of a string.

Steps to Reproduce:

  1. View the CodeSandbox link below and make sure the console is open
  2. Click on the title text ('This is a title') and notice two console.log statements for each time the title is clicked
  3. Click on the card body (not the title text) and notice that there's only one console.log statement for each time the body is clicked

CodeSandbox Link: https://codesandbox.io/s/card-onclick-demo-jue9fj?file=/demo.tsx

11C30291-17E8-4539-AE92-CFEBD89B6E09_2_0_a.mov

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions