9474 field value toggle group filter function#9534
Open
CollegeRideOut wants to merge 2 commits intoelastic:mainfrom
Open
9474 field value toggle group filter function#9534CollegeRideOut wants to merge 2 commits intoelastic:mainfrom
CollegeRideOut wants to merge 2 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? |
| */ | ||
|
|
||
| import React, { Component } from 'react'; | ||
| import React, { FC } from 'react'; |
Contributor
There was a problem hiding this comment.
As on your other PR: https://github.com/elastic/eui/pull/9535/changes#r2993846514
Contributor
|
buildkite test this |
Contributor
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.
Collaborator
💚 Build Succeeded |
Collaborator
💔 Build Failed
Failed CI Steps |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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