Fix transition and focus prop combination for PopoverPanel component (#3361)

* trigger effect when ref value changes

* update changelog
This commit is contained in:
Robin Malfait
2024-07-04 12:36:12 +02:00
committed by GitHub
parent 70f88f4e26
commit d8f44e0cd7
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Ensure `unmount` on `Dialog` works in combination with the `transition` prop on `DialogBackdrop` and `DialogPanel` components ([#3352](https://github.com/tailwindlabs/headlessui/pull/3352))
- Fix crash in `Combobox` component when in `virtual` mode when options are empty ([#3356](https://github.com/tailwindlabs/headlessui/pull/3356))
- Fix hanging tests when using `anchor` prop ([#3357](https://github.com/tailwindlabs/headlessui/pull/3357))
- Fix `transition` and `focus` prop combination for `PopoverPanel` component ([#3361](https://github.com/tailwindlabs/headlessui/pull/3361))
## [2.1.1] - 2024-06-26
@@ -930,7 +930,7 @@ function PanelFn<TTag extends ElementType = typeof DEFAULT_PANEL_TAG>(
if (internalPanelRef.current.contains(activeElement)) return // Already focused within Dialog
focusIn(internalPanelRef.current, Focus.First)
}, [state.__demoMode, focus, internalPanelRef, state.popoverState])
}, [state.__demoMode, focus, internalPanelRef.current, state.popoverState])
let slot = useMemo(() => {
return {