File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
packages/kit-headless/src/components/select Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,9 @@ export function useTypeahead() {
1717 return ;
1818 }
1919
20- inputStrSig . value += key ;
21-
2220 const firstCharOnly$ = $ ( ( ) => {
21+ console . log ( 'herehrere' ) ;
22+
2323 // First opens the listbox if it is not already displayed and then moves visual focus to the first option that matches the typed character.
2424 const singleInputChar = key . toLowerCase ( ) ;
2525
@@ -56,15 +56,17 @@ export function useTypeahead() {
5656
5757 const multipleChars$ = $ ( ( ) => {
5858 console . log ( inputStrSig . value ) ;
59-
6059 // If multiple keys are typed in quick succession, visual focus moves to the first option that matches the full string.
6160 clearTimeout ( prevTimeoutSig . value ) ;
6261 prevTimeoutSig . value = setTimeout ( ( ) => {
6362 inputStrSig . value = '' ;
6463 } , 1000 ) ;
6564 } ) ;
65+ //
66+ if ( inputStrSig . value . length === 1 ) {
67+ firstCharOnly$ ( ) ;
68+ }
6669
67- firstCharOnly$ ( ) ;
6870 multipleChars$ ( ) ;
6971 } ) ;
7072
You can’t perform that action at this time.
0 commit comments