refactor: convert FieldValueToggleFilter to function component#9522
Open
CollegeRideOut wants to merge 3 commits intoelastic:mainfrom
Open
refactor: convert FieldValueToggleFilter to function component#9522CollegeRideOut wants to merge 3 commits intoelastic:mainfrom
CollegeRideOut wants to merge 3 commits intoelastic:mainfrom
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? |
Contributor
|
buildkite test this |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the internal FieldValueToggleFilter search bar filter from a class component to a stateless function component, aiming to keep behavior the same while modernizing the implementation.
Changes:
- Converted
FieldValueToggleFilterfromComponenttoFC<FieldValueToggleFilterProps>. - Moved class methods (
resolveDisplay,valueChanged) to local arrow functions within the function component. - Applied formatting updates (though a few formatting/style issues remain in the diff).
Comments suppressed due to low confidence (1)
packages/eui/src/components/search_bar/filters/field_value_toggle_filter.tsx:78
- The component export ends with
}instead of};, and there are multiple trailing blank lines at EOF. Please run prettier/formatting (or manually adjust) to match the conventions in other filters (single newline at EOF, semicolons where expected).
);
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/eui/src/components/search_bar/filters/field_value_toggle_filter.tsx
Show resolved
Hide resolved
packages/eui/src/components/search_bar/filters/field_value_toggle_filter.tsx
Outdated
Show resolved
Hide resolved
Collaborator
💚 Build Succeeded |
…gle_filter.tsx Co-authored-by: Copilot <[email protected]>
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
Convert FieldValueToggleFilter from a class component to a stateless function component.
FC<FieldValueToggleFilterProps>styleAPI Changes
None — this is an internal component and its API hasn’t changed.
Screenshots
Not applicable — no visual changes.
Impact Assessment
Impact level: 🟢 None
Release Readiness
QA instructions for reviewer
Checklist before marking Ready for Review