@@ -36,12 +36,11 @@ const AccordionItem = React.forwardRef(function AccordionItem(
36
36
onOpenChange : onOpenChangeProp ,
37
37
render,
38
38
value : valueProp ,
39
- ...otherProps
39
+ ...other
40
40
} = props ;
41
41
42
- const sectionRef = React . useRef < HTMLElement > ( null ) ;
43
42
const { ref : listItemRef , index } = useCompositeListItem ( ) ;
44
- const mergedRef = useForkRef ( forwardedRef , listItemRef , sectionRef ) ;
43
+ const mergedRef = useForkRef ( forwardedRef , listItemRef ) ;
45
44
46
45
const {
47
46
animated,
@@ -71,9 +70,7 @@ const AccordionItem = React.forwardRef(function AccordionItem(
71
70
72
71
const onOpenChange = useEventCallback ( ( nextOpen : boolean ) => {
73
72
handleOpenChange ( value , nextOpen ) ;
74
- if ( onOpenChangeProp ) {
75
- onOpenChangeProp ( nextOpen ) ;
76
- }
73
+ onOpenChangeProp ?.( nextOpen ) ;
77
74
} ) ;
78
75
79
76
const collapsible = useCollapsibleRoot ( {
@@ -128,7 +125,7 @@ const AccordionItem = React.forwardRef(function AccordionItem(
128
125
className,
129
126
ownerState,
130
127
ref : mergedRef ,
131
- extraProps : otherProps ,
128
+ extraProps : other ,
132
129
customStyleHookMapping : accordionStyleHookMapping ,
133
130
} ) ;
134
131
@@ -141,8 +138,6 @@ const AccordionItem = React.forwardRef(function AccordionItem(
141
138
) ;
142
139
} ) ;
143
140
144
- export { AccordionItem } ;
145
-
146
141
export namespace AccordionItem {
147
142
export type Value = number | string ;
148
143
@@ -166,6 +161,8 @@ export namespace AccordionItem {
166
161
}
167
162
}
168
163
164
+ export { AccordionItem } ;
165
+
169
166
AccordionItem . propTypes /* remove-proptypes */ = {
170
167
// ┌────────────────────────────── Warning ──────────────────────────────┐
171
168
// │ These PropTypes are generated from the TypeScript type definitions. │
0 commit comments