File tree Expand file tree Collapse file tree 1 file changed +26
-28
lines changed
src/renderer/features/tasks/components Expand file tree Collapse file tree 1 file changed +26
-28
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,6 @@ export function TaskSearch({ value, onChange }: TaskSearchProps) {
1515 setTimeout ( ( ) => inputRef . current ?. focus ( ) , 0 ) ;
1616 } ;
1717
18-
19-
2018 useEffect ( ( ) => {
2119 const handleKeyDown = ( e : KeyboardEvent ) => {
2220 if ( e . key === "f" && ( e . metaKey || e . ctrlKey ) ) {
@@ -45,34 +43,34 @@ export function TaskSearch({ value, onChange }: TaskSearchProps) {
4543 width : "250px" ,
4644 } }
4745 >
48- < TextField . Root
49- ref = { inputRef }
50- value = { value }
51- onChange = { ( e ) => onChange ( e . target . value ) }
52- placeholder = "Search tasks..."
53- size = "1"
54- >
46+ < TextField . Root
47+ ref = { inputRef }
48+ value = { value }
49+ onChange = { ( e ) => onChange ( e . target . value ) }
50+ placeholder = "Search tasks..."
51+ size = "1"
52+ >
53+ < TextField . Slot >
54+ < MagnifyingGlassIcon height = "12" width = "12" />
55+ </ TextField . Slot >
56+ { value ? (
57+ < TextField . Slot >
58+ < IconButton
59+ size = "1"
60+ variant = "ghost"
61+ color = "gray"
62+ onClick = { handleClear }
63+ type = "button"
64+ >
65+ < Cross2Icon width = "12" height = "12" />
66+ </ IconButton >
67+ </ TextField . Slot >
68+ ) : (
5569 < TextField . Slot >
56- < MagnifyingGlassIcon height = "12" width = "12" / >
70+ < Kbd > ⌘F </ Kbd >
5771 </ TextField . Slot >
58- { value ? (
59- < TextField . Slot >
60- < IconButton
61- size = "1"
62- variant = "ghost"
63- color = "gray"
64- onClick = { handleClear }
65- type = "button"
66- >
67- < Cross2Icon width = "12" height = "12" />
68- </ IconButton >
69- </ TextField . Slot >
70- ) : (
71- < TextField . Slot >
72- < Kbd > ⌘F</ Kbd >
73- </ TextField . Slot >
74- ) }
75- </ TextField . Root >
72+ ) }
73+ </ TextField . Root >
7674 </ div >
7775 ) ;
7876}
You can’t perform that action at this time.
0 commit comments