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(ExpandableSearch): compose prop handlers with internal (#12135) #12143

Conversation

gi
Copy link
Contributor

@gi gi commented Sep 23, 2022

  • fix(ExpandableSearch): compose prop handlers with internal

Closes #12135

The ExpandableSearch component passes a few callbacks from the underlying Search component in order to control its own state.

  • onBlur
  • onChange
  • onExpand
  • onFocus

These are not composed with any props on the ExpandableSearch component, meaning that any of those props specified will have no effect.

This fixes the issue.

Changelog

Changed

  • ExpandableSearch: compose event callbacks with internal handlers

Testing / Reviewing

  • Verified in Storybook
  • Added unit tests.

…sign-system#12135)

* fix(ExpandableSearch): compose prop handlers with internal
@gi gi requested a review from a team as a code owner September 23, 2022 09:33
@gi gi requested review from tw15egan and jnm2377 September 23, 2022 09:33
@netlify
Copy link

netlify bot commented Sep 23, 2022

Deploy Preview for carbon-components-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 5b4b6fa
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/633c6245f96cdf0009717056
😎 Deploy Preview https://deploy-preview-12143--carbon-components-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Sep 23, 2022

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 5b4b6fa
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/633c62451a38e70008c76c41
😎 Deploy Preview https://deploy-preview-12143--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@tw15egan
Copy link
Member

Hey @gi, thanks for the contribution and adding all the tests! I'm running into an issue where it seems like the ExpandableSearch no longer opens on click. Are you seeing this same behavior?

@gi
Copy link
Contributor Author

gi commented Sep 23, 2022

@tw15egan Thanks for catching that. The composeEventHandlers function was throwing an error because no event was being passed to the onExpand call in Search. This is fixed now.

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.

Working great, LGTM 👍 ✅

Thanks for contributing 🎉

@kodiakhq kodiakhq bot merged commit d5d10a0 into carbon-design-system:main Oct 4, 2022
@gi gi deleted the issue-12135/expandable-search-events-composed branch October 11, 2022 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Bug]: ExpandableSearch - onChange is not composed with internal handler
3 participants