-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add forwarding of refs for Header component #3891
Conversation
💖 Thanks for opening this pull request! 💖 Here is a list of things that will help get it across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
@andyrichardson hey! This thing was missed, but it will be great to bump it. Are you still interested in it? |
@layershifter for sure! I just need to get it passing in CI? |
@andyrichardson great 👍 Yes, let me know if I can help somehow there. P.S. please restore your fork as currently it's impossible to push changes 😺 |
@@ -159,4 +167,4 @@ Header.propTypes = { | |||
Header.Content = HeaderContent | |||
Header.Subheader = HeaderSubheader | |||
|
|||
export default Header | |||
export default React.forwardRef(Header) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, this change should happen in the definition i.e. const Header = React.forwardRef((props, ref) => {
- we have statics (
Header.Content
,Header.Subheader
) and it will not be usable on default export - a param for
React.forwardRef()
is a function, not component itself:
You will probably will have many CI issues (at least with |
Closing for housekeeping 🏠 If you would like to follow up on it, feel free to create a new PR 🐱 |
Partially addresses #3819