mui-datatables
mui-datatables copied to clipboard
can we have a filterType = radio ?
we have filtertype = checkbox, and dropdown , dropdown is for single filter, can we make it as radio ?
thanks
(filtertype = radio) I tried this but it is not working for me. so i have created a custom component and pass it MUIDatatable component property.
This is how i fix the issue.
import { FontAwesomeIcon, FontAwesomeIconProps } from '@fortawesome/react-fontawesome';
const StyledFontAwesomeIcon = styled(FontAwesomeIcon)color: ${({ theme }) => theme.palette.accent.lavenblue}; margin-left: 8px;;
const CheckCircleIcon = () => <StyledFontAwesomeIcon icon={faCheckCircle as FontAwesomeIconProps['icon']} />;
const CustomCheckbox = ({ checked }) => (checked ? <CheckCircleIcon /> : <></>);
<MUIDataTable data={data} columns={columns} options={{ options}} components={{ Checkbox: CustomCheckbox }} />