@@ -30,7 +30,10 @@ import { Link } from 'react-router-dom';
3030import { BulkDeleteButton , ListButton , SelectAllButton } from '../button' ;
3131import { ShowGuesser } from '../detail' ;
3232import TopToolbar from '../layout/TopToolbar' ;
33- import { BulkActionsToolbar } from './BulkActionsToolbar' ;
33+ import {
34+ BulkActionsToolbar ,
35+ BulkActionsToolbarProps ,
36+ } from './BulkActionsToolbar' ;
3437import { defaultLightTheme } from '../theme' ;
3538import { onlineManager } from '@tanstack/react-query' ;
3639import { deepmerge } from '@mui/utils' ;
@@ -543,7 +546,7 @@ export const Default = ({
543546} : {
544547 dataProvider ?: DataProvider ;
545548 children ?: React . ReactNode ;
546- selectAllButton ?: React . ReactElement ;
549+ selectAllButton ?: BulkActionsToolbarProps [ 'selectAllButton' ] ;
547550} ) => (
548551 < TestMemoryRouter initialEntries = { [ '/books' ] } >
549552 < Admin dataProvider = { dataProvider } >
@@ -590,6 +593,20 @@ export const SelectAllLimit = ({
590593 </ Default >
591594) ;
592595
596+ const MySelectAllButton = ( ) => < SelectAllButton limit = { 11 } /> ;
597+
598+ export const SelectAllAsComponent = ( {
599+ dataProvider,
600+ children,
601+ } : {
602+ dataProvider ?: DataProvider ;
603+ children ?: React . ReactNode ;
604+ } ) => (
605+ < Default selectAllButton = { MySelectAllButton } dataProvider = { dataProvider } >
606+ { children }
607+ </ Default >
608+ ) ;
609+
593610const NewerBooks = ( ) => (
594611 < List
595612 resource = "books"
0 commit comments