File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -317,8 +317,8 @@ export const Combobox = React.forwardRef(
317317
318318 let id = useId ( props . id ) ;
319319 let listboxId = id ? makeId ( "listbox" , id ) : "listbox" ;
320-
321320 let isControlledRef = React . useRef < boolean > ( false ) ;
321+ let isExpanded = popoverIsExpanded ( state ) ;
322322
323323 let context : InternalComboboxContextValue = {
324324 ariaLabel,
@@ -328,7 +328,7 @@ export const Combobox = React.forwardRef(
328328 comboboxId : id ,
329329 data,
330330 inputRef,
331- isExpanded : popoverIsExpanded ( state ) ,
331+ isExpanded,
332332 listboxId,
333333 onSelect : onSelect || noop ,
334334 openOnFocus,
@@ -352,12 +352,13 @@ export const Combobox = React.forwardRef(
352352 { ...props }
353353 data-reach-combobox = ""
354354 data-state = { getDataState ( state ) }
355+ data-expanded = { isExpanded || undefined }
355356 ref = { forwardedRef }
356357 >
357358 { isFunction ( children )
358359 ? children ( {
359360 id,
360- isExpanded : popoverIsExpanded ( state ) ,
361+ isExpanded,
361362 navigationValue : data . navigationValue ?? null ,
362363 state,
363364 } )
@@ -684,6 +685,7 @@ export const ComboboxPopover = React.forwardRef(
684685 as = { Comp }
685686 { ...props }
686687 ref = { ref }
688+ data-expanded = { isExpanded || undefined }
687689 position = { position }
688690 targetRef = { inputRef }
689691 { ...sharedProps }
You can’t perform that action at this time.
0 commit comments