File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ const Page = () => {
39
39
const [ exam , setExam ] = useState ( "" ) ;
40
40
const [ year , setYear ] = useState ( "" ) ;
41
41
const [ files , setFiles ] = useState < File [ ] > ( [ ] ) ;
42
+ const [ inputValue , setInputValue ] = useState ( '' )
43
+
42
44
const [ isSubjectCommandOpen , setIsSubjectCommandOpen ] = useState ( false ) ;
43
45
// const toggleOpenCamera = () => {
44
46
// setOpenCamera((prev) => !prev);
@@ -112,6 +114,7 @@ const Page = () => {
112
114
113
115
const handleSubjectSelect = ( value : string ) => {
114
116
setSubject ( value ) ;
117
+ setInputValue ( value )
115
118
setIsSubjectCommandOpen ( false ) ;
116
119
} ;
117
120
@@ -191,7 +194,10 @@ const Page = () => {
191
194
)}
192
195
</div> */ }
193
196
< Command className = "rounded-lg border shadow-md md:min-w-[450px]" >
194
- < CommandInput placeholder = "Type a subject or search..." />
197
+ < CommandInput
198
+ value = { inputValue }
199
+ onChangeCapture = { ( e ) => setInputValue ( ( e . target as HTMLInputElement ) . value ) }
200
+ placeholder = "Type a subject or search..." />
195
201
< CommandList className = "h-[100px]" >
196
202
< CommandEmpty > No results found.</ CommandEmpty >
197
203
You can’t perform that action at this time.
0 commit comments