Skip to content

Convert IdleSearchField to a function compontent / use hooks #6060

@mstange

Description

@mstange

IdleSearchField currently does not provide a way for parent components to focus the input. The current patch in #6025 uses a ref on a wrapper element and then gets at the input using wrapper.querySelector("input[type=search]") .

A cleaner solution would be to convert IdleSearchField to a function component and then use forwardRef, so that <IdleSearchField ref={searchfieldRef}/> gives the parent a ref to the input.

┆Issue is synchronized with this Jira Task

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Priority

None yet

Jira

https://mozilla-hub.atlassian.net/browse/FP-1310

Severity

None yet

Estimate

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions