File tree 3 files changed +6
-0
lines changed
3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ function QuestionAnswering({ application, showSettings }) {
125
125
const readers = useSelector ( ( state ) => state . readers ) ;
126
126
const dispatch = useDispatch ( ) ;
127
127
128
+ // Reference for search input
128
129
const searchRef = useRef ( null ) ;
129
130
130
131
return (
@@ -154,6 +155,7 @@ function QuestionAnswering({ application, showSettings }) {
154
155
dispatch
155
156
) ;
156
157
158
+ // Sets the focus on search input, accessing it through its reference
157
159
searchRef . current . focus ( ) ;
158
160
} }
159
161
>
Original file line number Diff line number Diff line change @@ -117,6 +117,7 @@ function Reading({ application, showSettings }) {
117
117
const readers = useSelector ( ( state ) => state . readers ) ;
118
118
const dispatch = useDispatch ( ) ;
119
119
120
+ // Reference for question input
120
121
const questionRef = useRef ( null ) ;
121
122
122
123
return (
@@ -157,6 +158,7 @@ function Reading({ application, showSettings }) {
157
158
dispatch
158
159
) ;
159
160
161
+ // Sets the focus on question input, accessing it through its reference
160
162
questionRef . current . focus ( ) ;
161
163
} }
162
164
>
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ function Retrieval({ application, showSettings }) {
103
103
const retrievers = useSelector ( ( state ) => state . retrievers ) ;
104
104
const dispatch = useDispatch ( ) ;
105
105
106
+ // Reference for search input
106
107
const searchRef = useRef ( null ) ;
107
108
108
109
return (
@@ -131,6 +132,7 @@ function Retrieval({ application, showSettings }) {
131
132
dispatch
132
133
) ;
133
134
135
+ // Sets the focus on search input, accessing it through its reference
134
136
searchRef . current . focus ( ) ;
135
137
} }
136
138
>
You can’t perform that action at this time.
0 commit comments