|
1 | 1 | /* eslint-disable @typescript-eslint/no-explicit-any */ |
| 2 | +import { MUIDataTableColumn } from 'mui-datatables'; |
2 | 3 | import { useRef, useState } from 'react'; |
3 | 4 | import { Avatar, Box, Grid, Tooltip, Typography } from '../../base'; |
4 | 5 | import { EditIcon, PersonIcon } from '../../icons'; |
@@ -121,7 +122,7 @@ const UsersTable: React.FC<UsersTableProps> = ({ |
121 | 122 | } |
122 | 123 | }; |
123 | 124 |
|
124 | | - const getValidColumnValue = (rowData: any, columnName: string, columns: any) => { |
| 125 | + const getValidColumnValue = (rowData: any, columnName: string, columns: MUIDataTableColumn[]) => { |
125 | 126 | const columnIndex = columns.findIndex((column: any) => column.name === columnName); |
126 | 127 | return rowData[columnIndex]; |
127 | 128 | }; |
@@ -233,7 +234,7 @@ const UsersTable: React.FC<UsersTableProps> = ({ |
233 | 234 | // ["actions", "xs"] |
234 | 235 | ]; |
235 | 236 |
|
236 | | - const columns: any[] = [ |
| 237 | + const columns: MUIDataTableColumn[] = [ |
237 | 238 | { |
238 | 239 | name: 'user_id', |
239 | 240 | label: 'User ID', |
@@ -445,7 +446,7 @@ const UsersTable: React.FC<UsersTableProps> = ({ |
445 | 446 | } |
446 | 447 | ]; |
447 | 448 |
|
448 | | - const [tableCols, updateCols] = useState<any[]>(columns); |
| 449 | + const [tableCols, updateCols] = useState<MUIDataTableColumn[]>(columns); |
449 | 450 |
|
450 | 451 | const [columnVisibility] = useState<Record<string, boolean>>(() => { |
451 | 452 | const showCols: Record<string, boolean> = updateVisibleColumns(colViews, width); |
|
0 commit comments