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

feat(ComboBox): add ability to forward ref #9136

Merged
merged 5 commits into from
Jul 8, 2021

Conversation

jnm2377
Copy link
Contributor

@jnm2377 jnm2377 commented Jul 7, 2021

Closes #8744

This PR updates the ComboBox component to use forwardRef since it's now a functional component, so that it can pass down any ref passed to it.

Changelog

Changed

  • uses forwardRef
  • adds ref example to the story for testing

Testing / Reviewing

In the ComboBox default story, you should now be able to see the ref being logged in the console and no warning. All tests should pass.

@jnm2377 jnm2377 requested a review from a team as a code owner July 7, 2021 15:08
@netlify
Copy link

netlify bot commented Jul 7, 2021

✔️ Deploy Preview for carbon-react-next ready!

🔨 Explore the source changes: d379845

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/60e732ae57c8f6000858ef4c

😎 Browse the preview: https://deploy-preview-9136--carbon-react-next.netlify.app

@netlify
Copy link

netlify bot commented Jul 7, 2021

✔️ Deploy Preview for carbon-elements ready!

🔨 Explore the source changes: d379845

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/60e732ae8f664d0007bb00b3

😎 Browse the preview: https://deploy-preview-9136--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented Jul 7, 2021

✔️ Deploy Preview for carbon-components-react ready!
Built without sensitive environment variables

🔨 Explore the source changes: d379845

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/60e732ae02df0a000753b63b

😎 Browse the preview: https://deploy-preview-9136--carbon-components-react.netlify.app

Copy link
Contributor

@joshblack joshblack left a comment

Choose a reason for hiding this comment

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

Looks great! Just left a small comment

packages/react/src/components/ComboBox/ComboBox-story.js Outdated Show resolved Hide resolved
Copy link
Member

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

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

LGTM 👍 ✅

@kodiakhq kodiakhq bot merged commit b68f837 into carbon-design-system:main Jul 8, 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.

ComboBox doesn't use ref now.
3 participants