File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ export const OverflowContext = React.createContext<{
19
19
20
20
// Rest Usage
21
21
className ?: string ;
22
+ rest ?: boolean ;
22
23
} > ( null ) ;
23
24
24
25
const RESPONSIVE = 'responsive' as const ;
@@ -321,6 +322,7 @@ function Overflow<ItemType = any>(
321
322
value = { {
322
323
...itemSharedProps ,
323
324
...restContextProps ,
325
+ rest : true ,
324
326
} }
325
327
>
326
328
{ renderRawRest ( omittedItems ) }
Original file line number Diff line number Diff line change @@ -20,11 +20,14 @@ export default function RawItem(props: RawItemProps) {
20
20
const { className : contextClassName , ...restContext } = context ;
21
21
const { className, ...restProps } = props ;
22
22
23
+ // Do not pass context to sub item to avoid multiple measure
23
24
return (
24
- < Item
25
- className = { classNames ( contextClassName , className ) }
26
- { ...restContext }
27
- { ...restProps }
28
- />
25
+ < OverflowContext . Provider value = { null } >
26
+ < Item
27
+ className = { classNames ( contextClassName , className ) }
28
+ { ...restContext }
29
+ { ...restProps }
30
+ />
31
+ </ OverflowContext . Provider >
29
32
) ;
30
33
}
You can’t perform that action at this time.
0 commit comments