File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,13 @@ export default function Sort() {
75
75
return SortTypes . BestMatch ;
76
76
}
77
77
} ;
78
+
79
+ const handleClick = ( ) => {
80
+ const elem = document . activeElement as HTMLElement ;
81
+ if ( elem ) {
82
+ elem ?. blur ( ) ;
83
+ }
84
+ } ;
78
85
return (
79
86
< div className = "flex justify-center items-center mb-8 flex-col gap-2" >
80
87
< div className = "dropdown dropdown-hover" >
@@ -85,10 +92,10 @@ export default function Sort() {
85
92
> </ FontAwesomeIcon >
86
93
Language
87
94
</ Button >
88
- < div className = "h-64 p-2 overflow-y-scroll shadow dropdown-content z-50 bg-base-100 rounded-box w-60" >
95
+ < div className = "h-64 p-2 overflow-y-scroll dropdown-content shadow z-50 bg-base-100 rounded-box w-60" >
89
96
< ul tabIndex = { 0 } className = "menu menu-vertical" >
90
97
{ mainLanguages . sort ( sortByName ) . map ( language => (
91
- < li key = { language } >
98
+ < li key = { language } onClick = { handleClick } >
92
99
< Link href = { `/repos/${ language . toLowerCase ( ) } ` } >
93
100
{ language }
94
101
</ Link >
@@ -114,7 +121,7 @@ export default function Sort() {
114
121
delete query . s ;
115
122
}
116
123
return (
117
- < li key = { index } >
124
+ < li key = { index } onClick = { handleClick } >
118
125
< Link href = { { query } } > { item . name } </ Link >
119
126
</ li >
120
127
) ;
You can’t perform that action at this time.
0 commit comments