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(react): add prop adapter for downshift changes #6427

Merged
merged 9 commits into from
Jul 10, 2020

Conversation

joshblack
Copy link
Contributor

Closes #6420

Adds in the prop adapter for Downshift to map from initial to default without a breaking change

Changelog

New

Changed

  • Add prop adapter to MultiSelect, Dropdown, Combobox, and Filterable MultiSelect

Removed

Testing / Reviewing

@joshblack joshblack requested a review from a team as a code owner July 9, 2020 15:40
@ghost ghost requested review from emyarod and tw15egan July 9, 2020 15:40
@netlify
Copy link

netlify bot commented Jul 9, 2020

Deploy preview for carbon-elements ready!

Built with commit c177089

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

@flannanl
Copy link

flannanl commented Jul 9, 2020

@joshblack I pull the code from your PR and try but it does not work for me.

@joshblack
Copy link
Contributor Author

@flannanl was it using your storybook example from the other PR? Or is this application code?

@netlify
Copy link

netlify bot commented Jul 9, 2020

Deploy preview for carbon-components-react ready!

Built without sensitive environment variables with commit c177089

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

@flannanl
Copy link

flannanl commented Jul 9, 2020

@joshblack I was testing with the storybook example I gave in my PR.

@joshblack
Copy link
Contributor Author

Hmm, not sure what's going on. Before the change we got this (incorrect) behavior:

image

When updating it, I get this behavior:

image

With this code:

image

@flannanl
Copy link

flannanl commented Jul 9, 2020

@joshblack did you try to open the dropdown and then lose focus?

@flannanl
Copy link

flannanl commented Jul 9, 2020

@joshblack Here is a clip showing the fix does not work.

combobox-bugfix

@joshblack
Copy link
Contributor Author

Thanks @flannanl! Totally get what you mean now, for ComboBox I totally missed that it was setting default directly instead of being in the mapping layer, will make sure to update along with the other changes. Thanks!

@joshblack
Copy link
Contributor Author

@flannanl just updated with that change!

@flannanl
Copy link

flannanl commented Jul 9, 2020

@joshblack Thanks! Your latest fixes work!

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 as expected 👍 ✅

Copy link
Member

@emyarod emyarod left a comment

Choose a reason for hiding this comment

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

looks good to me

@kodiakhq kodiakhq bot merged commit 0037736 into carbon-design-system:master Jul 10, 2020
@joshblack joshblack deleted the 6425-add-prop-adapter branch July 10, 2020 15:04
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.

Pre-selecting items in ComboBox does not work in v7.15
5 participants