🐛[BUG] - Filter in Column don't seem to work
Hi,
Local filtering for ProTable doesn't seem to work, at least partially.
I have the following columns def:
https://github.com/SquirrelCorporation/SquirrelServersManager/blob/master/client/src/pages/Admin/Inventory/InventoryColumns.tsx
For some reason, filtering locally with the field "IP" works, but the others don't.
Am I doing something wrong or this is a bug?
- "@ant-design/icons": "^5.3.7",
- "@ant-design/pro-components": "^2.7.9",
- "@ant-design/use-emotion-css": "1.0.4",
- "@umijs/route-utils": "^4.0.1",
- "@ant-design/charts": "^2.1.1",
- "antd": "^5.17.4",
Example of column definition:
const columns: ProColumns<API.DeviceItem>[] = [
{
title: 'Host ID ',
dataIndex: 'uuid',
valueType: 'textarea',
hideInTable: true,
},
{
title: 'IP',
dataIndex: 'ip',
render: (dom, entity) => {
return (
<a
key={entity.uuid}
onClick={() => {
setCurrentRow(entity);
setShowDetail(true);
}}
>
{dom}
</a>
);
},
},
{
title: 'Hostname',
dataIndex: 'hostname',
valueType: 'textarea',
},
{
title: 'Status',
dataIndex: 'status',
hideInForm: true,
valueEnum: {
0: {
text: 'Registering',
status: 'Warning',
},
1: {
text: 'Online',
status: 'Success',
},
2: {
text: 'Down',
status: 'Error',
},
3: {
text: 'Unmanaged',
status: 'Processing',
},
},
},
Continuing further my investigation and looking at the request part of ProTable, printing the filterargument
{ filters: true/false, onFilter: true/false} is never printing any values in the object (in this example, uuid is always null in the filter param of the request call).