File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/kit-headless/src/components/autocomplete Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -130,20 +130,19 @@ export const AutocompleteRoot = component$(
130
130
const isExpanded = useSignal ( false ) ;
131
131
const triggerRef = useSignal < HTMLElement > ( ) ;
132
132
const listBoxRef = useSignal < HTMLElement > ( ) ;
133
+ const rootRef = useSignal < HTMLElement > ( ) ;
133
134
const labelRef = useSignal < HTMLElement > ( ) ;
134
135
const inputValue = useSignal ( defaultValue ? defaultValue : '' ) ;
135
136
const listBoxId = useId ( ) ;
136
137
const inputId = useId ( ) ;
137
138
const buttonId = useId ( ) ;
138
139
const activeOptionId = useSignal ( null ) ;
139
140
const focusInput$ = $ ( ( inputId : string ) => {
140
- triggerRef . value
141
+ rootRef . value
141
142
?. querySelector < HTMLElement > (
142
143
`[data-autocomplete-input-id="${ inputId } "]`
143
144
)
144
145
?. focus ( ) ;
145
-
146
- console . log ( triggerRef . value ) ;
147
146
} ) ;
148
147
149
148
const contextService : AutocompleteContext = {
@@ -228,6 +227,7 @@ export const AutocompleteRoot = component$(
228
227
props . onKeyDown$ ,
229
228
] }
230
229
{ ...props }
230
+ ref = { rootRef }
231
231
>
232
232
< Slot />
233
233
</ div >
You can’t perform that action at this time.
0 commit comments