import { FilterDropdown, getDefaultFilter } from "@refinedev/antd";
// ... other imports
<Table.Column<BusinessProfile>
dataIndex={['business_contract_data', 'business_type']}
title="Business Type"
render={(value) => <Tag color={value === 'commercial_business' ? 'blue' : 'orange'}>{value}</Tag>}
filterDropdown={(props) => (
<FilterDropdown
{...props}
mapValue={(selectedKeys, event) => {
if (event === "onChange") {
// When filter is applied, rename the key to 'business_type'
return {
business_type: selectedKeys
};
}
return selectedKeys;
}}
>
<Select
mode="multiple"
placeholder="Filter Business Type"
style={{ width: '150px' }}
options={[
{ label: "Commercial Business", value: ContractBusinessType.COMMERCIAL_BUSINESS },
{ label: "Freelancer", value: ContractBusinessType.FREELANCER },
]}
/>
</FilterDropdown>
)}
defaultFilteredValue={getDefaultFilter("business_type", filters, "in")}
/>
import { FilterDropdown, getDefaultFilter } from "@refinedev/antd";
// ... other imports
<Table.Column<BusinessProfile>
dataIndex={['business_contract_data', 'business_type']}
title="Business Type"
render={(value) => <Tag color={value === 'commercial_business' ? 'blue' : 'orange'}>{value}</Tag>}
filterDropdown={(props) => (
<FilterDropdown
{...props}
mapValue={(selectedKeys, event) => {
if (event === "onChange") {
// When filter is applied, rename the key to 'business_type'
return {
business_type: selectedKeys
};
}
return selectedKeys;
}}
>
<Select
mode="multiple"
placeholder="Filter Business Type"
style={{ width: '150px' }}
options={[
{ label: "Commercial Business", value: ContractBusinessType.COMMERCIAL_BUSINESS },
{ label: "Freelancer", value: ContractBusinessType.FREELANCER },
]}
/>
</FilterDropdown>
)}
defaultFilteredValue={getDefaultFilter("business_type", filters, "in")}
/>