Skip to content

Convert IdleSearchField to a function compontent / use hooks #6060

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

code maintenanceIssues that are not user facing, but are related the technical debt with the code itself

Type

Fields

Priority

P3

Severity

N/A

Jira

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

Estimate

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions