File tree Expand file tree Collapse file tree 2 files changed +20
-7
lines changed
packages/ra-ui-materialui/src/list/datatable Expand file tree Collapse file tree 2 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ import {
3737import {
3838 BulkDeleteButton ,
3939 BulkExportButton ,
40+ CreateButton ,
4041 EditButton ,
4142 SelectAllButton as RaSelectAllButton ,
4243} from '../../button' ;
@@ -896,3 +897,17 @@ export const NonPrimitiveData = () => (
896897 </ DataTable >
897898 </ Wrapper >
898899) ;
900+
901+ export const HeaderButton = ( ) => (
902+ < Wrapper i18nProvider = { polyglotI18nProvider ( ( ) => defaultMessages , 'en' ) } >
903+ < DataTable >
904+ < DataTable . Col source = "id" />
905+ < DataTable . Col source = "title" />
906+ < DataTable . Col label = "Author" source = "author.name" disableSort />
907+ < DataTable . Col source = "year" />
908+ < DataTable . Col label = { < CreateButton /> } >
909+ < EditButton />
910+ </ DataTable . Col >
911+ </ DataTable >
912+ </ Wrapper >
913+ ) ;
Original file line number Diff line number Diff line change @@ -120,13 +120,11 @@ export const DataTableHeadCell = React.memo(
120120 </ TableSortLabel >
121121 </ Tooltip >
122122 ) : (
123- < TableSortLabel disabled >
124- < FieldTitle
125- label = { label }
126- source = { source }
127- resource = { resource }
128- />
129- </ TableSortLabel >
123+ < FieldTitle
124+ label = { label }
125+ source = { source }
126+ resource = { resource }
127+ />
130128 ) }
131129 </ TableCellStyled >
132130 ) ;
You can’t perform that action at this time.
0 commit comments