unique-blueU
Refine3y ago
30 replies
unique-blue

Can I use the antD useTable with a resource or endpoint that is essentially custom?

Hi guys, wondering if i'm going about this the wrong way and could use some advice / help if possible.

for eg.

i want to do something like this and make a table that disaplys and filters custom data

export const ForwardPackProjectionTable: React.FC<{}> = () => { const { tableProps: projectionTableProps, tableQueryResult, searchFormProps, } = useTable< IPackProjection, HttpError, ForwardPackProjectionFilterVariables >({ resource: subscriptions/project, initialPageSize: 100, onSearch: (params) => { const filters: CrudFilters = []; const { packName, month } = params; console.log("params", params); console.log("masterPack", packName); filters.push({ field: "packName", operator: "eq", value: packName, }); console.log("month", month); filters.push({ field: "month", operator: "eq", value: month, }); console.log("filters", filters); return filters; }, });

where subscriptions/project returns an array of objects, that's to say that it isn;t a List, or Show or something wired in like that
Was this page helpful?