Skip to content

[EuiSearchBar] Migrate from class to function component #9464

@weronikaolejniczak

Description

@weronikaolejniczak

EuiSearchBar is a search input with filter controls, query parsing, and suggestion support. Commonly used across Kibana for search UIs.

  • File: components/search_bar/search_bar.tsx
  • Class size: 167 lines
  • State: query, queryText, error, isHintVisible
  • Lifecycle: getDerivedStateFromProps

Migration notes:

The getDerivedStateFromProps pattern needs careful conversion — likely to a controlled component pattern or useMemo/useEffect sync. The rest is standard state.

Acceptance criteria:

  • Convert to function component with hooks
  • Correctly handle getDerivedStateFromProps → props-to-state sync
  • Maintain query parsing and filter integration
  • All existing tests pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedThe EUI team is unlikely prioritize. (Don't delete - used for automation)low hanging fruitAn issue, often a bug, that is lower effort and clearly ought to be fixed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions