diff --git a/src/components/enhanced-table/filter-row/filter-cell/FilterCell.jsx b/src/components/enhanced-table/filter-row/filter-cell/FilterCell.tsx similarity index 54% rename from src/components/enhanced-table/filter-row/filter-cell/FilterCell.jsx rename to src/components/enhanced-table/filter-row/filter-cell/FilterCell.tsx index 8ffbe7e83..a8233f08c 100644 --- a/src/components/enhanced-table/filter-row/filter-cell/FilterCell.jsx +++ b/src/components/enhanced-table/filter-row/filter-cell/FilterCell.tsx @@ -3,8 +3,30 @@ import TableCell from '@mui/material/TableCell' import SearchInput from '~/components/search-input/SearchInput' import DateFilter from '~/components/enhanced-table/date-filter/DateFilter' import EnumFilter from '~/components/enhanced-table/enum-filter/EnumFilter' +import { TableColumn } from '~/types' -const FilterCell = ({ column, filter, setFilter, clearFilter }) => { +interface TableColumnProps extends TableColumn { + dataType: 'string' +} + +interface Filter { + from: string | null + to: string | null +} + +interface FilterCellProps { + column: TableColumnProps + filter?: F + setFilter: (filter: F) => void + clearFilter: () => void +} + +const FilterCell = ({ + column, + filter, + setFilter, + clearFilter +}: FilterCellProps) => { const enums = ( { const string = ( >} /> ) const date = ( void} /> )