File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,9 @@ export interface OverflowProps<ItemType> extends React.HTMLAttributes<any> {
50
50
suffix ?: React . ReactNode ;
51
51
component ?: ComponentType ;
52
52
itemComponent ?: ComponentType ;
53
+
54
+ /** @private This API may be refactor since not well design */
55
+ onVisibleChange ?: ( visibleCount : number ) => void ;
53
56
}
54
57
55
58
function defaultRenderRest < ItemType > ( omittedItems : ItemType [ ] ) {
@@ -75,6 +78,7 @@ function Overflow<ItemType = any>(
75
78
suffix,
76
79
component : Component = 'div' ,
77
80
itemComponent,
81
+ onVisibleChange,
78
82
...restProps
79
83
} = props ;
80
84
@@ -147,6 +151,8 @@ function Overflow<ItemType = any>(
147
151
setDisplayCount ( count ) ;
148
152
if ( ! notReady ) {
149
153
setRestReady ( count < data . length - 1 ) ;
154
+
155
+ onVisibleChange ?.( count ) ;
150
156
}
151
157
}
152
158
You can’t perform that action at this time.
0 commit comments