firefox-devtools / firefox-devtools/profiler

Convert IdleSearchField to a function compontent / use hooks

Open
#6,060 3 comments 0 reactions 1 assignee Claimed by @stuticoder123 View on GitHub
code maintenance
Dominant language
TypeScript
Stars
1.5k
Forks
491
Avg merge
3d 46m
Merged PRs (30d)
27

Description

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 `` gives the parent a ref to the input.

┆Issue is synchronized with this [Jira Task](https://mozilla-hub.atlassian.net/browse/FP-1310)

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.