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

fix(content-switcher): provide empty default onChange prop #6945

Merged

Conversation

janhassel
Copy link
Member

Prevents the ContentSwitcher from throwing an error when no onChange prop is passed yet. Demo of current behaviour (click on "two" or "three"): https://l4ijp.csb.app/

Changelog

New

  • added () => {} as default onChange prop

Changed

  • update PublicAPI snapshot to reflect this change

Testing / Reviewing

  • Unit tests should make sure no functionality is affected
  • Manual: Remove the onChange prop from the ContentSwitcher playground story and verify that it does not throw an error as it does in the codesandbox

@janhassel janhassel requested review from a team as code owners October 1, 2020 07:16
@netlify
Copy link

netlify bot commented Oct 1, 2020

Deploy preview for carbon-elements ready!

Built with commit b2e1c37

https://deploy-preview-6945--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented Oct 1, 2020

Deploy preview for carbon-components-react ready!

Built without sensitive environment variables with commit b2e1c37

https://deploy-preview-6945--carbon-components-react.netlify.app

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.

👍 ✅

@kodiakhq kodiakhq bot merged commit 6e2a519 into carbon-design-system:master Oct 5, 2020
@janhassel janhassel deleted the content-switcher-on-change branch October 6, 2020 05:59
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

3 participants