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

removed dependency on option list of custom option #3183

Merged
merged 5 commits into from
Apr 2, 2020

Conversation

anishagg17
Copy link
Contributor

@anishagg17 anishagg17 commented Mar 27, 2020

Summary

Fixes: #2258

Replaced return flattenOptionGroups(options).length === selectedOptions.length; this equality check with more robust and accurate check within the EuiComboBox component which checks for length equality without including any of the custom option

Checklist

- [ ] Check against all themes for compatibility in both light and dark modes
- [ ] Checked in mobile
- [ ] Checked in IE11 and Firefox
- [ ] Props have proper autodocs
- [ ] Added documentation examples
- [ ] Added or updated jest tests

  • Checked for breaking changes and labeled appropriately
    - [ ] Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

@kibanamachine
Copy link

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@anishagg17 anishagg17 changed the title removed dependedncy on option list of custom option removed dependency on option list of custom option Mar 27, 2020
@anishagg17
Copy link
Contributor Author

@snide should the entry in Changelog.md be under breaking-changes section

@cchaos cchaos requested a review from chandlerprall March 30, 2020 19:59
@chandlerprall
Copy link
Contributor

The removal of onCreateOption's second parameter, options, doesn't seem to be necessary? Would be nice to avoid making this a breaking change.

@anishagg17
Copy link
Contributor Author

Changes have been made

@chandlerprall
Copy link
Contributor

The onCreateOption definition & docs examples shouldn't need to be changed for this, either. I think only that logic change in combo_box.tsx is necessary.

@anishagg17
Copy link
Contributor Author

Updated accordingly

@anishagg17
Copy link
Contributor Author

I optimized it a bit more by mapping label of each flattenOptionGroups(options) to option.label.trim().toLowerCase()

@chandlerprall
Copy link
Contributor

jenkins test this

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3183/

Copy link
Contributor

@chandlerprall chandlerprall left a comment

Choose a reason for hiding this comment

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

Changes LGTM! Pulled & tested locally

@chandlerprall chandlerprall merged commit 7779759 into elastic:master Apr 2, 2020
@anishagg17 anishagg17 deleted the combo branch April 2, 2020 18:23
Marvin9 pushed a commit to Marvin9/eui that referenced this pull request Apr 2, 2020
* removed dependedncy on option list of custom option

* reverted all changes

* CL

* Optimized
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.

EuiComboBox assumes custom options will be added to options list
3 participants