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$(
130130 const isExpanded = useSignal ( false ) ;
131131 const triggerRef = useSignal < HTMLElement > ( ) ;
132132 const listBoxRef = useSignal < HTMLElement > ( ) ;
133+ const rootRef = useSignal < HTMLElement > ( ) ;
133134 const labelRef = useSignal < HTMLElement > ( ) ;
134135 const inputValue = useSignal ( defaultValue ? defaultValue : '' ) ;
135136 const listBoxId = useId ( ) ;
136137 const inputId = useId ( ) ;
137138 const buttonId = useId ( ) ;
138139 const activeOptionId = useSignal ( null ) ;
139140 const focusInput$ = $ ( ( inputId : string ) => {
140- triggerRef . value
141+ rootRef . value
141142 ?. querySelector < HTMLElement > (
142143 `[data-autocomplete-input-id="${ inputId } "]`
143144 )
144145 ?. focus ( ) ;
145-
146- console . log ( triggerRef . value ) ;
147146 } ) ;
148147
149148 const contextService : AutocompleteContext = {
@@ -228,6 +227,7 @@ export const AutocompleteRoot = component$(
228227 props . onKeyDown$ ,
229228 ] }
230229 { ...props }
230+ ref = { rootRef }
231231 >
232232 < Slot />
233233 </ div >
You can’t perform that action at this time.
0 commit comments