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() {
17
17
return ;
18
18
}
19
19
20
- inputStrSig . value += key ;
21
-
22
20
const firstCharOnly$ = $ ( ( ) => {
21
+ console . log ( 'herehrere' ) ;
22
+
23
23
// First opens the listbox if it is not already displayed and then moves visual focus to the first option that matches the typed character.
24
24
const singleInputChar = key . toLowerCase ( ) ;
25
25
@@ -56,15 +56,17 @@ export function useTypeahead() {
56
56
57
57
const multipleChars$ = $ ( ( ) => {
58
58
console . log ( inputStrSig . value ) ;
59
-
60
59
// If multiple keys are typed in quick succession, visual focus moves to the first option that matches the full string.
61
60
clearTimeout ( prevTimeoutSig . value ) ;
62
61
prevTimeoutSig . value = setTimeout ( ( ) => {
63
62
inputStrSig . value = '' ;
64
63
} , 1000 ) ;
65
64
} ) ;
65
+ //
66
+ if ( inputStrSig . value . length === 1 ) {
67
+ firstCharOnly$ ( ) ;
68
+ }
66
69
67
- firstCharOnly$ ( ) ;
68
70
multipleChars$ ( ) ;
69
71
} ) ;
70
72
You can’t perform that action at this time.
0 commit comments