elastic / elastic/eui

[EuiFieldSearch] Migrate from class to function component

Open
#9,498 4 comments 0 reactions 0 assignees View on GitHub
help wanted low hanging fruit
Dominant language
TypeScript
Stars
6.4k
Forks
911
Avg merge
2d 11h
Merged PRs (30d)
65

Description

`EuiFieldSearch` is a search input with incremental search support, clear button, and controlled/uncontrolled modes.

- **File:** `components/form/field_search/field_search.tsx`
- **Class size:** 220 lines
- **State:** `value`
- **Lifecycle:** `componentDidMount`, `componentWillUnmount`

**Migration notes:**

Lifecycle manages the native `search` event listener on the input element. Maps to `useEffect`. Wrapped with `withEuiStylesMemoizer`.

**Acceptance criteria:**

- [ ] Convert to function component with hooks
- [ ] Maintain incremental search behavior
- [ ] All existing tests pass

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.