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> {
5050 suffix ?: React . ReactNode ;
5151 component ?: ComponentType ;
5252 itemComponent ?: ComponentType ;
53+
54+ /** @private This API may be refactor since not well design */
55+ onVisibleChange ?: ( visibleCount : number ) => void ;
5356}
5457
5558function defaultRenderRest < ItemType > ( omittedItems : ItemType [ ] ) {
@@ -75,6 +78,7 @@ function Overflow<ItemType = any>(
7578 suffix,
7679 component : Component = 'div' ,
7780 itemComponent,
81+ onVisibleChange,
7882 ...restProps
7983 } = props ;
8084
@@ -147,6 +151,8 @@ function Overflow<ItemType = any>(
147151 setDisplayCount ( count ) ;
148152 if ( ! notReady ) {
149153 setRestReady ( count < data . length - 1 ) ;
154+
155+ onVisibleChange ?.( count ) ;
150156 }
151157 }
152158
You can’t perform that action at this time.
0 commit comments