File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
packages/ra-ui-materialui/src/list Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -383,3 +383,36 @@ export const WithSimpleList = () => (
383383 />
384384 </ Admin >
385385) ;
386+
387+ export const PartialPagination = ( ) => (
388+ < Admin
389+ dataProvider = { {
390+ ...dataProvider ,
391+ getList : ( resource , params ) =>
392+ dataProvider
393+ . getList ( resource , params )
394+ . then ( ( { data, total } ) => ( {
395+ data,
396+ pageInfo : {
397+ hasNextPage :
398+ total ! >
399+ params . pagination . page *
400+ params . pagination . perPage ,
401+ hasPreviousPage : params . pagination . page > 1 ,
402+ } ,
403+ } ) ) ,
404+ } }
405+ >
406+ < Resource
407+ name = "books"
408+ list = { ( ) => (
409+ < InfiniteList >
410+ < SimpleList
411+ primaryText = "%{title}"
412+ secondaryText = "%{author}"
413+ />
414+ </ InfiniteList >
415+ ) }
416+ />
417+ </ Admin >
418+ ) ;
You can’t perform that action at this time.
0 commit comments