Skip to content
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

Adds support for passing component type or element to PreviewContent, supports React.forwardRef #1248

Merged
merged 2 commits into from
May 14, 2018

Conversation

danielmahon
Copy link
Contributor

@danielmahon danielmahon commented Apr 11, 2018

I ran into this issue while trying to pass a HOC that returned a React.forwardRef. This adds an appropriate check of whether to clone or create the preview element.

Note: Adds dependancy react-is, which is recommended by the react team

@verythorough
Copy link
Contributor

verythorough commented Apr 11, 2018

Deploy preview for netlify-cms-www ready!

Built with commit cf1bb33

https://deploy-preview-1248--netlify-cms-www.netlify.com

@verythorough
Copy link
Contributor

verythorough commented Apr 11, 2018

Deploy preview for cms-demo ready!

Built with commit cf1bb33

https://deploy-preview-1248--cms-demo.netlify.com

Copy link
Contributor

@erquhart erquhart left a comment

Choose a reason for hiding this comment

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

Nice, thanks @danielmahon! Seems more performant, too.

@erquhart
Copy link
Contributor

Apologies for the delay on this, merging up.

@erquhart erquhart merged commit 40494a4 into decaporg:master May 14, 2018
brianlmacdonald pushed a commit to brianlmacdonald/netlify-cms that referenced this pull request May 23, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants