Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure correct display name for forwardRef components #3440

Merged
merged 4 commits into from
May 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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';