Setting resource for data provider
How can I set the resource attribute that is sent to my dataProvider by my saveButtonProps? Here is the code I would like to modify the resource for inside the create method of the dataProvider:
const onFinishHandler = (data: FieldValues) => {
onFinish({
...data,
part_id: data?.part_id?.part_id,
sagat_type_id: data?.sagat_type_id?.sagat_type_id,
});
};
return (
<Create isLoading={formLoading} saveButtonProps={{ onClick: handleSubmit(onFinishHandler) }}>
<Box