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

EuiComboBox - remove cross icon when singleSelection is enabled #769

Merged
merged 3 commits into from
May 3, 2018

Conversation

nreese
Copy link
Contributor

@nreese nreese commented May 3, 2018

screen shot 2018-05-03 at 2 57 45 pm

@nreese nreese requested review from snide and cchaos May 3, 2018 21:05
CHANGELOG.md Outdated
@@ -2,6 +2,7 @@

- Added `EuiDescribedFormGroup` component, a wrapper around `EuiFormRow`(s) ([#707](https://github.com/elastic/eui/pull/707))
- Added `describedByIds` prop to `EuiFormRow` to help with accessibility ([#707](https://github.com/elastic/eui/pull/707))
- `EuiComboBox` remove cross icon when `singleSelection` is enabled ([#769](https://github.com/elastic/eui/pull/769))
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe...

Removed individual badge cross icon when EuiComboBox has singleSelection prop enabled.

When I read this at first I assumed you were removing the all clear cross.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is also adding the idea of single selection more than just the extra step of removing the badge's cross. May want say something regarding that?

Copy link
Contributor

Choose a reason for hiding this comment

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

nevermind me....

Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

Can you add a docs section that explains single selection? I'm thinking it will eventually do more than just remove this button.

@@ -47,6 +47,7 @@ export class EuiComboBox extends Component {
options: [],
selectedOptions: [],
isClearable: true,
singleSelection: false,
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be added to the propTypes object too, correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is already a prop type on EuiComboBox. This PR just sets a default value to false and passes the prop to EuiComboBoxInput.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah you're right, we may want to think about alphabetizing our props... ha!

@nreese
Copy link
Contributor Author

nreese commented May 3, 2018

@cchaos There is already a docs section on single selection, https://github.com/elastic/eui/blob/master/src-docs/src/views/combo_box/combo_box_example.js#L197. Do you think this needs more details?

Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

Ugh, nevermind me, it's been a long day....

@nreese nreese merged commit a398a53 into elastic:master May 3, 2018
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