@@ -105,7 +105,10 @@ function WidgetTopBar(): ReactElement {
105105 < div className = { cls . topBar } >
106106 < div className = { cls . pagingTop } >
107107 < div className = { cls . ptStart } > { useTopCounter ( ) ? < SelectionCounter /> : null } </ div >
108- < div className = { cls . ptEnd } > { usePagingTop ( ) ? < Pagination /> : null } </ div >
108+ < div className = { cls . ptEnd } >
109+ { usePagingTop ( ) ? < Pagination /> : null }
110+ { useCustomPagination ( "top" ) ? < CustomPagination /> : null }
111+ </ div >
109112 </ div >
110113 </ div >
111114 ) ;
@@ -137,7 +140,10 @@ function WidgetFooter(): ReactElement {
137140 </ button >
138141 ) : null }
139142 </ div >
140- < div className = { cls . pbEnd } > { usePagingBot ( ) ? < Pagination /> : null } </ div >
143+ < div className = { cls . pbEnd } >
144+ { usePagingBot ( ) ? < Pagination /> : null }
145+ { useCustomPagination ( "bottom" ) ? < CustomPagination /> : null }
146+ </ div >
141147 </ div >
142148 </ div >
143149 ) ;
@@ -326,6 +332,15 @@ const Pagination = (): ReactNode => {
326332 ) ;
327333} ;
328334
335+ const CustomPagination = ( ) : ReactNode => {
336+ const { customPagination } = useProps ( ) ;
337+ return (
338+ < customPagination . renderer caption = "Custom pagination: Place widgets here" >
339+ < div style = { { flexGrow : 1 } } />
340+ </ customPagination . renderer >
341+ ) ;
342+ } ;
343+
329344function useColumns ( ) : ColumnsPreviewType [ ] {
330345 const { columns } = useProps ( ) ;
331346 return columns . length > 0 ? columns : initColumns ;
@@ -381,12 +396,17 @@ function useBottomCounter(): boolean {
381396
382397function usePagingTop ( ) : boolean {
383398 const props = useProps ( ) ;
384- const visible = props . showNumberOfRows || props . pagination === "buttons" ;
399+ const visible = ( props . showNumberOfRows || props . pagination === "buttons" ) && ! props . useCustomPagination ;
385400 return visible && props . pagingPosition !== "bottom" ;
386401}
387402
388403function usePagingBot ( ) : boolean {
389404 const props = useProps ( ) ;
390- const visible = props . showNumberOfRows || props . pagination === "buttons" ;
405+ const visible = ( props . showNumberOfRows || props . pagination === "buttons" ) && ! props . useCustomPagination ;
391406 return visible && props . pagingPosition !== "top" ;
392407}
408+
409+ function useCustomPagination ( location : "top" | "bottom" ) : boolean {
410+ const props = useProps ( ) ;
411+ return props . useCustomPagination && ( props . pagingPosition === location || props . pagingPosition === "both" ) ;
412+ }
0 commit comments