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 borderRadius display error when there is only 2 options #88

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

srhb18
Copy link

@srhb18 srhb18 commented Jul 25, 2017

When thers is only 2 options, this brancn condition will break first option's borderRadius props, this new condition will fix this, but made no seprator between two options. Consider in most scene one of the option will always be seleced, this side effect can be accepted.

Copy link

@eHammarstrom eHammarstrom left a comment

Choose a reason for hiding this comment

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

See file comments.

@@ -120,7 +120,7 @@ class SegmentedControls extends React.Component {
borderBottomRightRadius: adjustedBorderRadius
}
}
if (index === this.props.options.length - 2) {
Copy link

@eHammarstrom eHammarstrom Aug 3, 2017

Choose a reason for hiding this comment

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

Simply changing if to else if solves the problem. The additional conditional does not seem necessary.

Choose a reason for hiding this comment

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

@eHammarstrom when this fix going to be merged?
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants