@@ -7,7 +7,7 @@ import Filler from './Filler';
77import type { InnerProps } from './Filler' ;
88import type { ScrollBarDirectionType , ScrollBarRef } from './ScrollBar' ;
99import ScrollBar from './ScrollBar' ;
10- import type { RenderFunc , SharedConfig , GetKey } from './interface' ;
10+ import type { RenderFunc , SharedConfig , GetKey , ExtraRenderInfo } from './interface' ;
1111import useChildren from './hooks/useChildren' ;
1212import useHeights from './hooks/useHeights' ;
1313import useScrollTo from './hooks/useScrollTo' ;
@@ -69,6 +69,9 @@ export interface ListProps<T> extends Omit<React.HTMLAttributes<any>, 'children'
6969
7070 /** Inject to inner container props. Only use when you need pass aria related data */
7171 innerProps ?: InnerProps ;
72+
73+ /** Render extra content into Filler */
74+ extraRender ?: ( info : ExtraRenderInfo ) => React . ReactNode ;
7275}
7376
7477export function RawList < T > ( props : ListProps < T > , ref : React . Ref < ListRef > ) {
@@ -89,6 +92,7 @@ export function RawList<T>(props: ListProps<T>, ref: React.Ref<ListRef>) {
8992 onScroll,
9093 onVisibleChange,
9194 innerProps,
95+ extraRender,
9296 ...restProps
9397 } = props ;
9498
@@ -386,7 +390,23 @@ export function RawList<T>(props: ListProps<T>, ref: React.Ref<ListRef>) {
386390 } , [ start , end , mergedData ] ) ;
387391
388392 // ================================ Render ================================
389- const listChildren = useChildren ( mergedData , start , end , setInstanceRef , children , sharedConfig ) ;
393+ const listChildren = useChildren (
394+ mergedData ,
395+ start ,
396+ end ,
397+ scrollWidth ,
398+ setInstanceRef ,
399+ children ,
400+ sharedConfig ,
401+ ) ;
402+
403+ const extraContent = extraRender ?.( {
404+ start,
405+ end,
406+ virtual : inVirtual ,
407+ offsetX : offsetLeft ,
408+ rtl : isRTL ,
409+ } ) ;
390410
391411 let componentStyle : React . CSSProperties = null ;
392412 if ( height ) {
@@ -438,13 +458,14 @@ export function RawList<T>(props: ListProps<T>, ref: React.Ref<ListRef>) {
438458 ref = { fillerInnerRef }
439459 innerProps = { innerProps }
440460 rtl = { isRTL }
461+ extra = { extraContent }
441462 >
442463 { listChildren }
443464 </ Filler >
444465 </ Component >
445466 </ ResizeObserver >
446467
447- { useVirtual && scrollHeight > height && (
468+ { inVirtual && scrollHeight > height && (
448469 < ScrollBar
449470 ref = { verticalScrollBarRef }
450471 prefixCls = { prefixCls }
@@ -459,7 +480,7 @@ export function RawList<T>(props: ListProps<T>, ref: React.Ref<ListRef>) {
459480 />
460481 ) }
461482
462- { useVirtual && scrollWidth && (
483+ { inVirtual && scrollWidth && (
463484 < ScrollBar
464485 ref = { horizontalScrollBarRef }
465486 prefixCls = { prefixCls }
0 commit comments