[FieldValueToggleGroupFilter] Migrate from class to function component#9534
[FieldValueToggleGroupFilter] Migrate from class to function component#9534CollegeRideOut wants to merge 3 commits intoelastic:mainfrom
Conversation
|
👋 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? |
|
buildkite test this |
There was a problem hiding this comment.
Pull request overview
Converts FieldValueToggleGroupFilter (an internal EuiSearchBar filter renderer) from a class component to a function component, aligning it with the rest of the search bar filter components and the project’s modern React patterns.
Changes:
- Replaced the
Component-based implementation with anFCfunction component. - Converted
resolveDisplayandvalueChangedclass methods into internal functions usingprops. - Removed all
thisusage while preserving the existing render/output logic.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
💚 Build Succeeded |
💔 Build Failed
Failed CI StepsHistory |
weronikaolejniczak
left a comment
There was a problem hiding this comment.
The code looks great, I see no issues. The CI was flaky, I re-ran it. 🟢
Thank you for contributing, @CollegeRideOut 🙌🏻
Summary
What: Convert
FieldValueToggleGroupFilterfrom a class component to a function component.Why: Closes #9474
How:
Replaced the class component with a function component
Converted class methods (
resolveDisplay,valueChanged) to internal functionsRemoved
thisusage and switched to props-based accessPreserved existing behavior and rendering logic
API Changes
component / parent | prop / child | change | description -- | -- | -- | -- N/A | | None | No public API changesImpact Assessment
🔴 Breaking changes
💅 Visual changes
🧪 Test impact
🔧 Hard to integrate
Impact level: 🟢 None
QA instructions for reviewer
Verify toggle buttons render correctly
Confirm selecting/deselecting values updates the query as expected
Ensure no behavioral regressions
Checklist before marking Ready for Review
Filled out all sections above
Note: This PR description was written with the assistance of AI.
## SummaryWhat: Convert
FieldValueToggleGroupFilterfrom a class component to a function component.Why: Closes [#9474](#9474)
How:
resolveDisplay,valueChanged) to internal functionsthisusage and switched to props-based accessAPI Changes
Impact Assessment
Impact level: 🟢 None
QA instructions for reviewer
Checklist before marking Ready for Review
Note: This PR description was written with the assistance of AI.
I code was written by hand. AI tools not used on the actual code this time