Skip to content

Commit bb8f614

Browse files
author
Hernan Rojek Moriceau
committed
feat (ux): Comments on #19 implementation
1 parent 2ee434f commit bb8f614

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/applications/qa/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ function QuestionAnswering({ application, showSettings }) {
125125
const readers = useSelector((state) => state.readers);
126126
const dispatch = useDispatch();
127127

128+
// Reference for search input
128129
const searchRef = useRef(null);
129130

130131
return (
@@ -154,6 +155,7 @@ function QuestionAnswering({ application, showSettings }) {
154155
dispatch
155156
);
156157

158+
// Sets the focus on search input, accessing it through its reference
157159
searchRef.current.focus();
158160
}}
159161
>

src/applications/reading/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ function Reading({ application, showSettings }) {
117117
const readers = useSelector((state) => state.readers);
118118
const dispatch = useDispatch();
119119

120+
// Reference for question input
120121
const questionRef = useRef(null);
121122

122123
return (
@@ -157,6 +158,7 @@ function Reading({ application, showSettings }) {
157158
dispatch
158159
);
159160

161+
// Sets the focus on question input, accessing it through its reference
160162
questionRef.current.focus();
161163
}}
162164
>

src/applications/retrieval/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ function Retrieval({ application, showSettings }) {
103103
const retrievers = useSelector((state) => state.retrievers);
104104
const dispatch = useDispatch();
105105

106+
// Reference for search input
106107
const searchRef = useRef(null);
107108

108109
return (
@@ -131,6 +132,7 @@ function Retrieval({ application, showSettings }) {
131132
dispatch
132133
);
133134

135+
// Sets the focus on search input, accessing it through its reference
134136
searchRef.current.focus();
135137
}}
136138
>

0 commit comments

Comments
 (0)