Skip to content

9474 field value toggle group filter function#9534

Open
CollegeRideOut wants to merge 2 commits intoelastic:mainfrom
CollegeRideOut:9474-field-value-toggle-group-filter-function
Open

9474 field value toggle group filter function#9534
CollegeRideOut wants to merge 2 commits intoelastic:mainfrom
CollegeRideOut:9474-field-value-toggle-group-filter-function

Conversation

@CollegeRideOut
Copy link
Copy Markdown
Contributor

Summary

What: Convert FieldValueToggleGroupFilter from 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 functions

  • Removed this usage and switched to props-based access

  • Preserved existing behavior and rendering logic


API Changes

component / parent | prop / child | change | description -- | -- | -- | -- N/A |   | None | No public API changes

Impact 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.

## Summary

What: Convert FieldValueToggleGroupFilter from a class component to a function component.

Why: Closes [#9474](#9474)

How:

  • Replaced the class component with a function component
  • Converted class methods (resolveDisplay, valueChanged) to internal functions
  • Removed this usage and switched to props-based access
  • Preserved existing behavior and rendering logic

API Changes

component / parent prop / child change description
N/A None No public API changes

Impact 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.
I code was written by hand. AI tools not used on the actual code this time

@CollegeRideOut CollegeRideOut requested a review from a team as a code owner March 25, 2026 19:07
@github-actions
Copy link
Copy Markdown

👋 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?

@github-actions github-actions bot added the community contribution (Don't delete - used for automation) label Mar 25, 2026
*/

import React, { Component } from 'react';
import React, { FC } from 'react';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weronikaolejniczak weronikaolejniczak added the skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) label Mar 26, 2026
@weronikaolejniczak
Copy link
Copy Markdown
Contributor

buildkite test this

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 an FC function component.
  • Converted resolveDisplay and valueChanged class methods into internal functions using props.
  • Removed all this usage while preserving the existing render/output logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@elasticmachine
Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

@elasticmachine
Copy link
Copy Markdown
Collaborator

💔 Build Failed

Failed CI Steps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community contribution (Don't delete - used for automation) skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FieldValueToggleGroupFilter] Migrate from class to function component

4 participants