@@ -41,39 +41,39 @@ const columns: readonly Column<Row>[] = [
4141 }
4242] ;
4343
44- function globalRenderCell ( key : React . Key , props : CellRendererProps < Row , unknown > ) {
44+ function renderGlobalCell ( key : React . Key , props : CellRendererProps < Row , unknown > ) {
4545 return < Cell key = { key } { ...props } className = "global" style = { { fontStyle : 'italic' } } /> ;
4646}
4747
48- function localRenderCell ( key : React . Key , props : CellRendererProps < Row , unknown > ) {
48+ function renderLocalCell ( key : React . Key , props : CellRendererProps < Row , unknown > ) {
4949 return < Cell key = { key } { ...props } className = "local" style = { { fontStyle : 'normal' } } /> ;
5050}
5151
52- function globalRenderRow ( key : React . Key , props : RenderRowProps < Row > ) {
52+ function renderGlobalRow ( key : React . Key , props : RenderRowProps < Row > ) {
5353 return < DefaultRow key = { key } { ...props } className = "global" /> ;
5454}
5555
56- function localRenderRow ( key : React . Key , props : RenderRowProps < Row > ) {
56+ function renderLocalRow ( key : React . Key , props : RenderRowProps < Row > ) {
5757 return < DefaultRow key = { key } { ...props } className = "local" /> ;
5858}
5959
6060function NoRowsFallback ( ) {
6161 return < div > Local no rows fallback</ div > ;
6262}
6363
64- function GlobalNoRowsFallback ( ) {
64+ function NoRowsGlobalFallback ( ) {
6565 return < div > Global no rows fallback</ div > ;
6666}
6767
68- function localRenderCheckbox ( ) {
68+ function renderLocalCheckbox ( ) {
6969 return < div > Local checkbox</ div > ;
7070}
7171
72- function globalRenderCheckbox ( ) {
72+ function renderGlobalCheckbox ( ) {
7373 return < div > Global checkbox</ div > ;
7474}
7575
76- function globalSortStatus ( { sortDirection, priority } : RenderSortStatusProps ) {
76+ function renderGlobalSortStatus ( { sortDirection, priority } : RenderSortStatusProps ) {
7777 return (
7878 < >
7979 { renderSortIcon ( { sortDirection } ) }
@@ -82,7 +82,7 @@ function globalSortStatus({ sortDirection, priority }: RenderSortStatusProps) {
8282 ) ;
8383}
8484
85- function renderSortStatus ( { sortDirection, priority } : RenderSortStatusProps ) {
85+ function renderLocalSortStatus ( { sortDirection, priority } : RenderSortStatusProps ) {
8686 return (
8787 < >
8888 { renderSortIcon ( { sortDirection } ) }
@@ -101,11 +101,11 @@ function setupProvider<R, SR, K extends React.Key>(props: DataGridProps<R, SR, K
101101 return render (
102102 < DataGridDefaultRenderersProvider
103103 value = { {
104- noRowsFallback : < GlobalNoRowsFallback /> ,
105- renderCheckbox : globalRenderCheckbox ,
106- renderSortStatus : globalSortStatus ,
107- renderCell : globalRenderCell ,
108- renderRow : globalRenderRow
104+ noRowsFallback : < NoRowsGlobalFallback /> ,
105+ renderCheckbox : renderGlobalCheckbox ,
106+ renderSortStatus : renderGlobalSortStatus ,
107+ renderCell : renderGlobalCell ,
108+ renderRow : renderGlobalRow
109109 } }
110110 >
111111 < TestGrid { ...props } />
@@ -165,7 +165,7 @@ test('fallback defined using both provider and renderers with a row', () => {
165165} ) ;
166166
167167test ( 'checkbox defined using renderers prop' , ( ) => {
168- setup ( { columns, rows : noRows , renderers : { renderCheckbox : localRenderCheckbox } } ) ;
168+ setup ( { columns, rows : noRows , renderers : { renderCheckbox : renderLocalCheckbox } } ) ;
169169
170170 expect ( getRows ( ) ) . toHaveLength ( 0 ) ;
171171 expect ( screen . getByText ( 'Local checkbox' ) ) . toBeInTheDocument ( ) ;
@@ -179,7 +179,7 @@ test('checkbox defined using provider', () => {
179179} ) ;
180180
181181test ( 'checkbox defined using both provider and renderers' , ( ) => {
182- setupProvider ( { columns, rows : noRows , renderers : { renderCheckbox : localRenderCheckbox } } ) ;
182+ setupProvider ( { columns, rows : noRows , renderers : { renderCheckbox : renderLocalCheckbox } } ) ;
183183
184184 expect ( getRows ( ) ) . toHaveLength ( 0 ) ;
185185 expect ( screen . getByText ( 'Local checkbox' ) ) . toBeInTheDocument ( ) ;
@@ -203,7 +203,7 @@ test('sortPriority defined using both providers', async () => {
203203} ) ;
204204
205205test ( 'sortPriority defined using both providers and renderers' , async ( ) => {
206- setupProvider ( { columns, rows : noRows , renderers : { renderSortStatus } } ) ;
206+ setupProvider ( { columns, rows : noRows , renderers : { renderSortStatus : renderLocalSortStatus } } ) ;
207207
208208 const [ , headerCell2 , headerCell3 ] = getHeaderCells ( ) ;
209209 const user = userEvent . setup ( ) ;
@@ -237,7 +237,7 @@ test('renderCell defined using both providers and renderers', () => {
237237 setupProvider ( {
238238 columns,
239239 rows : [ { id : 1 , col1 : 'value 1' , col2 : 'value 2' } ] ,
240- renderers : { renderCell : localRenderCell }
240+ renderers : { renderCell : renderLocalCell }
241241 } ) ;
242242
243243 const [ , cell1 , cell2 ] = getCells ( ) ;
@@ -264,7 +264,7 @@ test('renderRow defined using both providers and renderers', () => {
264264 setupProvider ( {
265265 columns,
266266 rows : [ { id : 1 , col1 : 'value 1' , col2 : 'value 2' } ] ,
267- renderers : { renderRow : localRenderRow }
267+ renderers : { renderRow : renderLocalRow }
268268 } ) ;
269269
270270 const [ row ] = getRows ( ) ;
0 commit comments