We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 181c72b commit 9142f0dCopy full SHA for 9142f0d
web/components/select-users.tsx
@@ -38,6 +38,16 @@ export function SelectUsers(props: {
38
const requestId = useRef(0)
39
const queryReady = query.length > 1
40
41
+ const inputRef = useRef<HTMLInputElement>(null)
42
+
43
+ useEffect(() => {
44
+ // Wait for the modal (and transition) to finish
45
+ const timeout = setTimeout(() => {
46
+ inputRef.current?.focus()
47
+ }, 100)
48
+ return () => clearTimeout(timeout)
49
+ }, [])
50
51
useEffect(() => {
52
const id = ++requestId.current
53
if (queryReady) {
@@ -66,6 +76,7 @@ export function SelectUsers(props: {
66
76
<>
67
77
<Col className="relative mt-1 w-full rounded-md">
68
78
<Input
79
+ ref={inputRef}
69
80
type="text"
70
81
name="user name"
71
82
id="user name"
0 commit comments