Repository navigation
[EuiSearchBar] Memoize field value selection filter styles - #10258
Conversation
|
💚 CLA has been signed |
|
👋 Since this is a community submitted pull request, a Buildkite build has not been started automatically. Would an Elastic organization member please verify the contents of this pull request and kick off a build manually? |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the search filter style memoization change.
No open issues 🎉
What changed in this PR
Memoizes the search bar’s field value selection filter styles, addressing #10163 without changing behavior, appearance, or the public API.
Changes:
- Replaces
RenderWithEuiThemewithRenderWithEuiStylesMemoizerfor the class component. - Retrieves
euiFilterGroupStylesthrough the memoizer instead of regenerating styles on each render.
| File | Description |
|---|---|
packages/eui/src/components/search_bar/filters/field_value_selection_filter.tsx |
Uses memoized theme styles for the filter’s popover panel. |
Review effort: Balanced
|
I have signed the Elastic contributor agreement with the same email I used for the commit ([[email protected]](mailto:[email protected])). Could someone re-run the CLA check, and could an Elastic member kick off the Buildkite build when convenient? Thank you. |
|
buildkite test this |
💚 Build Succeeded
History
|
💚 Build Succeeded
History
|
mgadewoll
left a comment
There was a problem hiding this comment.
🟢 LGTM. Thanks for contributing! 🎉
Closes #10163
Switches FieldValueSelectionFilter from RenderWithEuiTheme to RenderWithEuiStylesMemoizer, since it is a class component and cannot use the useEuiMemoizedStyles hook. euiFilterGroupStyles is now read through the memoizer instead of being regenerated on every render. Behavior is unchanged.
No visual or API change. The issue says no changelog is needed, so none is added. Could a maintainer add the skip-changelog label?
I ran eslint, prettier, tsc and the search_bar unit tests locally, and they pass.