@@ -67,9 +67,9 @@ export const ColumnsSelector = ({ children }: ColumnsSelectorProps) => {
6767 const shouldDisplaySearchInput = childrenArray . length > 5 ;
6868
6969 return createPortal (
70- < MenuList >
70+ < Box sx = { { pt : 1 } } >
7171 { shouldDisplaySearchInput ? (
72- < Box component = "li" tabIndex = { - 1 } >
72+ < Box sx = { { mb : 1 } } >
7373 < ResettableTextField
7474 hiddenLabel
7575 label = ""
@@ -94,39 +94,40 @@ export const ColumnsSelector = ({ children }: ColumnsSelectorProps) => {
9494 resettable
9595 autoFocus
9696 size = "small"
97- sx = { { mb : 1 } }
9897 />
9998 </ Box >
10099 ) : null }
101- { paddedColumnRanks . map ( ( position , index ) => (
102- < DataTableColumnRankContext . Provider
103- value = { position }
104- key = { index }
105- >
106- < DataTableColumnFilterContext . Provider
107- value = { columnFilter }
100+ < MenuList sx = { { pt : 0 } } >
101+ { paddedColumnRanks . map ( ( position , index ) => (
102+ < DataTableColumnRankContext . Provider
103+ value = { position }
108104 key = { index }
109105 >
110- { childrenArray [ position ] }
111- </ DataTableColumnFilterContext . Provider >
112- </ DataTableColumnRankContext . Provider >
113- ) ) }
114- < Box
115- component = "li"
116- className = "columns-selector-actions"
117- sx = { { textAlign : 'center' , mt : 1 } }
118- >
119- < Button
120- onClick = { ( ) => {
121- setColumnRanks ( undefined ) ;
122- setHiddenColumns ( defaultHiddenColumns ) ;
123- } }
124- label = { translate ( 'ra.action.reset' , {
125- _ : 'Reset' ,
126- } ) }
127- />
128- </ Box >
129- </ MenuList > ,
106+ < DataTableColumnFilterContext . Provider
107+ value = { columnFilter }
108+ key = { index }
109+ >
110+ { childrenArray [ position ] }
111+ </ DataTableColumnFilterContext . Provider >
112+ </ DataTableColumnRankContext . Provider >
113+ ) ) }
114+ < Box
115+ component = "li"
116+ className = "columns-selector-actions"
117+ sx = { { textAlign : 'center' , mt : 1 } }
118+ >
119+ < Button
120+ onClick = { ( ) => {
121+ setColumnRanks ( undefined ) ;
122+ setHiddenColumns ( defaultHiddenColumns ) ;
123+ } }
124+ label = { translate ( 'ra.action.reset' , {
125+ _ : 'Reset' ,
126+ } ) }
127+ />
128+ </ Box >
129+ </ MenuList >
130+ </ Box > ,
130131 container
131132 ) ;
132133} ;
0 commit comments