Form initial default values on Edit.
I'm having a bit of trouble with my Refine Edit component.
I'm trying to edit a record, and the Edit form opens, but the default values aren't being populated. The data is being fetched from the API correctly, but it's not reflecting in the form fields.
I'm using
Any ideas on what I might be doing wrong?
I'm using a custom dataProvider that expects query parameters (resource?id=eq.${id}) instead of params (resource/:id) for fetching data. But in resource defination and routes I have set routes with params format. can that be an issue?
Here's a snippet of my code:
Passing this to Edit component from refinecore/mui
const data = useOne({
// resource: "products",
// id: 1,
// });
I'm trying to edit a record, and the Edit form opens, but the default values aren't being populated. The data is being fetched from the API correctly, but it's not reflecting in the form fields.
I'm using
useForm with defaultValues set, but it seems to be ignored.Any ideas on what I might be doing wrong?
I'm using a custom dataProvider that expects query parameters (resource?id=eq.${id}) instead of params (resource/:id) for fetching data. But in resource defination and routes I have set routes with params format. can that be an issue?
Here's a snippet of my code:
Passing this to Edit component from refinecore/mui
const data = useOne({
// resource: "products",
// id: 1,
// });
