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

Addon-docs: Fix refs support in Docs pages #15890

Merged
merged 3 commits into from Aug 23, 2021

Conversation

7rulnik
Copy link
Contributor

@7rulnik 7rulnik commented Aug 20, 2021

Issue: #10446

What I did

I wrapped components for Docs pages into React.forwardRef. Currently it's impossible to pass ref into <span>blah blah</span> for example because we override normal dom nodes here.

How to test

  • Is this testable with Jest or Chromatic screenshots? — Not sure
  • Does this need a new example in the kitchen sink apps?
  • Does this need an update to the documentation?

If your answer is yes to any of these, please make sure to include it in your PR.


Before:

image

After:

image

@nx-cloud
Copy link

nx-cloud bot commented Aug 20, 2021

Nx Cloud Report

CI ran the following commands for commit afe4b35. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch

Status Command
#000000 nx run-many --target=prepare --all --parallel --max-parallel=15

Sent with 💌 from NxCloud.

@7rulnik 7rulnik marked this pull request as ready for review August 20, 2021 14:24
@7rulnik 7rulnik changed the title feat: add forwardRef into resetComponents Fix: allow using refs in Docs pages Aug 20, 2021
@7rulnik 7rulnik changed the title Fix: allow using refs in Docs pages fix: allow using refs in Docs pages Aug 20, 2021
@shilman shilman changed the title fix: allow using refs in Docs pages Addon-docs: Fix refs support in Docs pages Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants