fix: add input ref and focus search fields on toggle (#7766)

* fix: add input ref and focus search fields on toggle

* refactor(proxy): remove unnecessary delay in input focus timeouts
This commit is contained in:
oomeow
2026-08-18 15:38:31 +00:00
committed by GitHub
parent 2436d5cf6a
commit 42b91b6294
2 changed files with 10 additions and 2 deletions
+3
View File
@@ -27,6 +27,7 @@ export type SearchState = {
type SearchOptionState = Omit<SearchState, 'text'>
type SearchProps = {
inputRef?: React.RefObject<HTMLInputElement | null>
value?: string
defaultValue?: string
autoFocus?: boolean
@@ -73,6 +74,7 @@ const useControllableState = <T,>(options: {
}
export const BaseSearchBox = ({
inputRef,
value,
defaultValue,
autoFocus,
@@ -200,6 +202,7 @@ export const BaseSearchBox = ({
return (
<Tooltip title={effectiveErrorMessage || ''} placement="bottom-start">
<StyledTextField
inputRef={inputRef}
autoComplete="new-password"
hiddenLabel
fullWidth