@@ -132,8 +132,14 @@ export function AppTable<T = any>(props: AppTableProps<T>): JSX.Element | null {
132132 />
133133 </ DTable . Td >
134134 ) }
135- { columns . map ( ( column , index ) => (
136- < DTable . Td key = { index } dWidth = { column . width } dFixed = { column . fixed } dAlign = { column . align } dNowrap = { column . nowrap } >
135+ { columns . map ( ( column , indexOfCol ) => (
136+ < DTable . Td
137+ key = { indexOfCol }
138+ dWidth = { column . width }
139+ dFixed = { column . fixed }
140+ dAlign = { column . align }
141+ dNowrap = { column . nowrap }
142+ >
137143 { isString ( column . td ) ? get ( data , column . td ) : column . td ( data , index ) }
138144 </ DTable . Td >
139145 ) ) }
@@ -159,8 +165,8 @@ export function AppTable<T = any>(props: AppTableProps<T>): JSX.Element | null {
159165 { getAction ( actions [ 0 ] ) }
160166 < DSeparator dVertical > </ DSeparator >
161167 < DDropdown
162- dList = { actions . slice ( 1 ) . map ( ( action , index ) => ( {
163- id : index + 1 ,
168+ dList = { actions . slice ( 1 ) . map ( ( action , indexOfAction ) => ( {
169+ id : indexOfAction + 1 ,
164170 label : action . text ,
165171 type : 'item' ,
166172 } ) ) }
@@ -178,10 +184,10 @@ export function AppTable<T = any>(props: AppTableProps<T>): JSX.Element | null {
178184 </ >
179185 ) ;
180186 } else {
181- return actions . map ( ( action , index ) => (
182- < React . Fragment key = { index } >
187+ return actions . map ( ( action , indexOfAction ) => (
188+ < React . Fragment key = { indexOfAction } >
183189 { getAction ( action ) }
184- { index !== actions . length - 1 && < DSeparator dVertical > </ DSeparator > }
190+ { indexOfAction !== actions . length - 1 && < DSeparator dVertical > </ DSeparator > }
185191 </ React . Fragment >
186192 ) ) ;
187193 }
@@ -249,8 +255,8 @@ export function AppTable<T = any>(props: AppTableProps<T>): JSX.Element | null {
249255 getAction ( actions [ 0 ] )
250256 ) : (
251257 < DDropdown
252- dList = { actions . map ( ( action , index ) => ( {
253- id : index ,
258+ dList = { actions . map ( ( action , indexOfAction ) => ( {
259+ id : indexOfAction ,
254260 label : action . text ,
255261 type : 'item' ,
256262 } ) ) }
@@ -290,7 +296,7 @@ export function AppTable<T = any>(props: AppTableProps<T>): JSX.Element | null {
290296 aLabelAlign = "right"
291297 aLabelWidth = { aLabelWidth }
292298 aList = { columns
293- . filter ( ( column , index ) => ! column . checkbox && index !== titleIndex )
299+ . filter ( ( column , indexOfCol ) => ! column . checkbox && indexOfCol !== titleIndex )
294300 . map ( ( column ) => ( {
295301 label : column . th as string ,
296302 content : isString ( column . td ) ? get ( data , column . td ) : column . td ( data , index ) ,
@@ -327,8 +333,8 @@ export function AppTable<T = any>(props: AppTableProps<T>): JSX.Element | null {
327333 ? [
328334 getAction ( actions [ 0 ] ) ,
329335 < DDropdown
330- dList = { actions . slice ( 1 ) . map ( ( action , index ) => ( {
331- id : index + 1 ,
336+ dList = { actions . slice ( 1 ) . map ( ( action , indexOfAction ) => ( {
337+ id : indexOfAction + 1 ,
332338 label : action . text ,
333339 type : 'item' ,
334340 } ) ) }
0 commit comments