diff --git a/src/components/enhanced-table/enhanced-table-header-cell/EnhancedTableHeaderCell.styles.js b/src/components/enhanced-table/enhanced-table-header-cell/EnhancedTableHeaderCell.styles.ts similarity index 100% rename from src/components/enhanced-table/enhanced-table-header-cell/EnhancedTableHeaderCell.styles.js rename to src/components/enhanced-table/enhanced-table-header-cell/EnhancedTableHeaderCell.styles.ts diff --git a/src/components/enhanced-table/enhanced-table-header-cell/EnhancedTableHeaderCell.jsx b/src/components/enhanced-table/enhanced-table-header-cell/EnhancedTableHeaderCell.tsx similarity index 73% rename from src/components/enhanced-table/enhanced-table-header-cell/EnhancedTableHeaderCell.jsx rename to src/components/enhanced-table/enhanced-table-header-cell/EnhancedTableHeaderCell.tsx index fb461eacf..82bdab05d 100644 --- a/src/components/enhanced-table/enhanced-table-header-cell/EnhancedTableHeaderCell.jsx +++ b/src/components/enhanced-table/enhanced-table-header-cell/EnhancedTableHeaderCell.tsx @@ -4,13 +4,22 @@ import TableCell from '@mui/material/TableCell' import TableSortLabel from '@mui/material/TableSortLabel' import { styles } from '~/components/enhanced-table/enhanced-table-header-cell/EnhancedTableHeaderCell.styles' +import { TableColumn, TableItem, TableSort } from '~/types' -const EnhancedTableHeaderCell = ({ column, sort }) => { +export interface EnhancedTableHeaderCellProps { + column: TableColumn + sort: TableSort +} + +const EnhancedTableHeaderCell = ({ + column, + sort +}: EnhancedTableHeaderCellProps) => { const { t } = useTranslation() const { sort: sortParams, onRequestSort } = sort const createSortHandler = () => { - onRequestSort(column.field) + onRequestSort(column.field ?? '') } return (