File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed
packages/@headlessui-react/src/components/listbox Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -589,17 +589,13 @@ function OptionsFn<TTag extends ElementType = typeof DEFAULT_OPTIONS_TAG>(
589589 // the panel whenever necessary.
590590 let panelEnabled = didButtonMove ? false : visible
591591
592- // The moment we picked a value in single value mode, the value should be
593- // frozen immediately.
594- let hasFrozenValue = useSlice ( machine , machine . selectors . hasFrozenValue )
595-
596592 // We should freeze when the listbox is visible but "closed". This means that
597593 // a transition is currently happening and the component is still visible (for
598594 // the transition) but closed from a functionality perspective.
599595 //
600596 // When the `static` prop is used, we should never freeze, because rendering
601597 // is up to the user.
602- let shouldFreeze = hasFrozenValue && ! props . static
598+ let shouldFreeze = useSlice ( machine , machine . selectors . hasFrozenValue ) && ! props . static
603599
604600 // Frozen state, the selected value will only update visually when the user re-opens the <Listbox />
605601 let frozenValue = useFrozenData ( shouldFreeze , data . value )
You can’t perform that action at this time.
0 commit comments