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(select-input): multi select tag borders #1238

Merged
merged 3 commits into from
Jan 14, 2020

Conversation

jonnybel
Copy link
Contributor

Summary

Small adjustment to the SelectInput styles, for multi-values: When there is no multiValueRemove component being displayed (by passing an empty component to it), the multiValueLabel doesn't have a right border.
This PR fixes that, to prevent the need to also override the multiValueLabel just for this styling detail, or other "hacky" workarounds.

Before:

image

After:

image

@jonnybel jonnybel added the 🐛 Type: Bug Something isn't working label Jan 14, 2020
@jonnybel jonnybel requested a review from adnasa January 14, 2020 12:41
@jonnybel jonnybel self-assigned this Jan 14, 2020
@vercel
Copy link

vercel bot commented Jan 14, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/commercetools/ui-kit/hbxd23lvw
✅ Preview: https://ui-kit-git-ja-fix-multi-select-input-tag-borders.commercetools.now.sh

@adnasa
Copy link
Contributor

adnasa commented Jan 14, 2020

One thing I've noticed is that MultiValueRemove must be a component. So either TagRemove or a div. Have you considered the possibility of accepting just null and from there passdown a dumb div to Select?

@adnasa
Copy link
Contributor

adnasa commented Jan 14, 2020

nvm.. one could do this:

So basically it will work if you pass () => null to components.MultiValueRemove (or a React.Fragment)

Copy link
Contributor

@adnasa adnasa left a comment

Choose a reason for hiding this comment

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

cool

@kodiakhq kodiakhq bot merged commit fea83af into master Jan 14, 2020
@kodiakhq kodiakhq bot deleted the ja-fix-multi-select-input-tag-borders branch January 14, 2020 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants