Can I provide filters to resource data being passed to the inferencer in a component?

I found the page on using the inferencer as part of a component (https://refine.dev/docs/api-reference/core/components/inferencer/), but I cannot figure out if I can apply filters to the data from the resource being provided to the inferencer. Is this possible? (By the way, I absolutely love the inferencer, it is seriously an incredible engineering feat and the addition of it to refine has really increased my productivity, having the code it generates ready for customization is absolutely incredible!)
5 Replies
raw-harlequin
raw-harlequin2y ago
extended-salmon
extended-salmon2y ago
Thanks! You were able to get it working?
raw-harlequin
raw-harlequin2y ago
import { HeadlessInferencer } from "@pankod/refine-inferencer/headless"; export default function page1() { const transformer = (field) => { if (field.key === "id") { return false; } return field; } return ( <> <span>page2</span> <HeadlessInferencer resource="categories" action="list" fieldTransformer={transformer} /> </> ) } i want way more control, so i will probably have to modify the data provider nd customize it to parse different api endpoints, but this works for already optimized apis
exotic-emerald
exotic-emerald2y ago
Thanks for the contribution @kg6800 ! @hortinstein , did the previous message answers your question?
extended-salmon
extended-salmon2y ago
Yeah thank you!