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

Ref in props tab for froward ref components #3956

Merged
merged 2 commits into from
Aug 24, 2020

Conversation

ashikmeerankutty
Copy link
Contributor

Summary

Makes progress on #3056

  • Updated react-docgen-typescript
  • Show ref as a prop in props tab if component is a forward ref component

Checklist

  • Props have proper autodocs

@kibanamachine
Copy link

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@chandlerprall
Copy link
Contributor

jenkins test this

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3956/

@chandlerprall chandlerprall self-requested a review August 24, 2020 16:19
@chandlerprall
Copy link
Contributor

This looks good, but is breaking the Props tab for EuiMarkdownEditor - presumably because the editor's ref is a custom value via useImperativeHandle

useImperativeHandle(
ref,
() => ({ textarea: textareaRef.current, replaceNode }),
[replaceNode]
);

@ashikmeerankutty
Copy link
Contributor Author

This looks good, but is breaking the Props tab for EuiMarkdownEditor - presumably because the editor's ref is a custom value via useImperativeHandle

The problem was with React. replaced it and is now working fine. Can you please verify.

@chandlerprall
Copy link
Contributor

jenkins test this

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3956/

Copy link
Contributor

@chandlerprall chandlerprall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; Spot checked existing prop definitions were not affected, but components with forwardRef now include ref as desired 👍

@chandlerprall chandlerprall merged commit 0dea10f into elastic:master Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants