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 EuiFieldSearch's onChange call so it is always called with the Event #2764

Conversation

chandlerprall
Copy link
Contributor

@chandlerprall chandlerprall commented Jan 15, 2020

Summary

Fixes #2763

When adding a clear button to EuiSearchField, the call signature for onChange was modified. This changes the call to always provide the change event to the handler.

This should make it into the Kibana 7.6 branch as a bug fix.

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

Copy link
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

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

Confirmed that the changes still clear the search text (including IE11) without error.

I did notice, though, that the clear button remains after being clicked. Previously, the button would be removed. My guess is that previously, the value was being set to null/undefined and now it's '' but the logic remained.

@chandlerprall
Copy link
Contributor Author

Great catch! Turns out nothing I originally wrote did anything of value. Refactored & pushed.

@thompsongl
Copy link
Contributor

jenkins test this

Copy link
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

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

Works for me; tested in IE11

@sebelga
Copy link
Contributor

sebelga commented Jan 16, 2020

Awesome! Thanks for bringing a fix so quickly! 👍

@chandlerprall chandlerprall merged commit 3400667 into elastic:master Jan 16, 2020
@chandlerprall chandlerprall deleted the bug/2763-euifieldsearch-onchange-call branch January 16, 2020 04:23
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.

EuiFieldSearch's manual call to onChange doesn't match intent
3 participants