File tree Expand file tree Collapse file tree 3 files changed +4
-10
lines changed
@headlessui-react/src/components/popover
@headlessui-vue/src/components/popover Expand file tree Collapse file tree 3 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
13
13
14
14
## [ Unreleased - @headlessui/react ]
15
15
16
- - Nothing yet!
16
+ ### Fixed
17
+
18
+ - Fix closing of ` Popover.Panel ` in React 18 ([ #1409 ] ( https://github.com/tailwindlabs/headlessui/pull/1409 ) )
17
19
18
20
## [ @headlessui/react @1.6.1] - 2022-05-03
19
21
Original file line number Diff line number Diff line change @@ -640,9 +640,6 @@ let Panel = forwardRefWithAs(function Panel<TTag extends ElementType = typeof DE
640
640
[ state , internalPanelRef , dispatch ]
641
641
)
642
642
643
- // Unlink on "unmount" myself
644
- useEffect ( ( ) => ( ) => dispatch ( { type : ActionTypes . SetPanel , panel : null } ) , [ dispatch ] )
645
-
646
643
// Unlink on "unmount" children
647
644
useEffect ( ( ) => {
648
645
if ( props . static ) return
Original file line number Diff line number Diff line change 1
1
import {
2
+ computed ,
2
3
defineComponent ,
3
4
inject ,
4
- onUnmounted ,
5
5
provide ,
6
6
ref ,
7
7
watchEffect ,
8
8
9
9
// Types
10
10
InjectionKey ,
11
11
Ref ,
12
- computed ,
13
12
} from 'vue'
14
13
15
14
import { match } from '../../utils/match'
@@ -477,10 +476,6 @@ export let PopoverPanel = defineComponent({
477
476
478
477
provide ( PopoverPanelContext , api . panelId )
479
478
480
- onUnmounted ( ( ) => {
481
- api . panel . value = null
482
- } )
483
-
484
479
// Move focus within panel
485
480
watchEffect ( ( ) => {
486
481
if ( ! focus ) return
You can’t perform that action at this time.
0 commit comments