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

move EuiFieldSearch's and EuiValidateControl's ref creation out of re… #883

Conversation

chandlerprall
Copy link
Contributor

Fixes #877

Turns out React calls a given ref function if it is a different function than the previous ref. This degrades developer experience and potentially app performance if the ref function is created in a component's render method. This behaviour was observed in in EuiFieldSearch, whose render path created new ref functions in two different places, I moved these to setRef class methods instead.

@chandlerprall chandlerprall requested a review from snide May 25, 2018 22:59
@chandlerprall
Copy link
Contributor Author

jenkins test this

@chandlerprall chandlerprall merged commit f3fc7b9 into elastic:master May 30, 2018
@chandlerprall chandlerprall deleted the bug/877-multiple-calls-to-fieldsearch-ref branch May 30, 2018 16:02
@snide
Copy link
Contributor

snide commented May 30, 2018

Added a changelog for this post merge.

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.

2 participants