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

Allow passing isDisabled to individual button group button #1424

Merged
merged 4 commits into from
Jan 10, 2019

Conversation

cchaos
Copy link
Contributor

@cchaos cchaos commented Jan 9, 2019

Fixes #1423

via

this.toggleButtons = [{
      id: `${idPrefix}0`,
      label: 'Option one',
      isDisabled: true,
    }, {
      id: `${idPrefix}1`,
      label: 'Option two is selected by default',
    }, {
      id: `${idPrefix}2`,
      label: 'Option three',
    }];

Checklist

  • [ ] This was checked in mobile
  • [ ] This was checked in IE11
  • [ ] This was checked in dark mode
  • [ ] Any props added have proper autodocs
  • [ ] Documentation examples were added
  • A changelog entry exists and is marked appropriately
  • [ ] This was checked for breaking changes and labeled appropriately
  • [ ] Jest tests were updated or added to match the most common scenarios
  • [ ] This was checked against keyboard-only and screenreader scenarios
  • [ ] This required updates to Framer X components

@cchaos cchaos requested a review from legrego January 9, 2019 22:23
Copy link
Member

@legrego legrego left a comment

Choose a reason for hiding this comment

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

Wow that was fast, thanks! I was going to tackle this tomorrow morning :)

Should we also update the prop types for options?

@cchaos
Copy link
Contributor Author

cchaos commented Jan 10, 2019

Yeah it isn't required and feels inherit, but we may as well be explicit. I'll add it.

Copy link
Member

@legrego legrego left a comment

Choose a reason for hiding this comment

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

LGTM pending merge conflict on the CHANGELOG. Thanks!

@cchaos cchaos merged commit 453d821 into elastic:master Jan 10, 2019
@cchaos cchaos deleted the button-group-disable branch January 10, 2019 17:19
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.

Disable individual buttons of an EuiButtonGroup
2 participants