Skip to content

Commit

Permalink
Ensure correct display name for forwardRef components (#3440)
Browse files Browse the repository at this point in the history
* ensure correct display name for forwardRef components

* export const

* CL
  • Loading branch information
thompsongl authored May 7, 2020
1 parent febff99 commit 662e8ed
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Added `aria-hidden = true` to `EuiRangeSlider` and `EuiRangeTrack` if `showInput = true` ([#3423](https://github.com/elastic/eui/pull/3423))
- Added `testenv` mock for `EuiCode` and `EuiCodeBlock` ([#3405](https://github.com/elastic/eui/pull/3405))
- Added `displayName` to components using `React.forwardRef` ([#3440](https://github.com/elastic/eui/pull/3440))

**Bug Fixes**

Expand Down
2 changes: 2 additions & 0 deletions src/components/badge/badge_group/badge_group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,5 @@ export const EuiBadgeGroup = React.forwardRef<
);
}
);

EuiBadgeGroup.displayName = 'EuiBadgeGroup';
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,5 @@ export const EuiHeaderSectionItemButton = React.forwardRef<
);
}
);

EuiHeaderSectionItemButton.displayName = 'EuiHeaderSectionItemButton';
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ exports[`EuiTabbedContent behavior when uncontrolled, the selected tab should up
}
>
<div>
<ForwardRef
<EuiTabs
onFocus={[Function]}
>
<div
Expand Down Expand Up @@ -135,7 +135,7 @@ exports[`EuiTabbedContent behavior when uncontrolled, the selected tab should up
</button>
</EuiTab>
</div>
</ForwardRef>
</EuiTabs>
<div
aria-labelledby="kibana"
id="42"
Expand Down
2 changes: 2 additions & 0 deletions src/components/tabs/tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,5 @@ export const EuiTabs = React.forwardRef<
);
}
);

EuiTabs.displayName = 'EuiTabs';

0 comments on commit 662e8ed

Please sign in to comment.