incredible-moccasinI
Refine3y ago
8 replies
incredible-moccasin

custom edit page

Hello, I'm trying to create a edit page from a different path than the standard, trying to adapt my useForm parameters.

My code looks like this:

export const UpdatePasswordPage: React.FC = () => {

const t = useTranslate();

const {
saveButtonProps,
handleSubmit,
refineCore: { queryResult, onFinish, formLoading },
register,
control,
formState: { errors },
} = useForm({

action: "edit",
resource: "users",
id : 5,

});

const UsersData = queryResult?.data?.data;
console.log( UsersData );

I cannot get the UsersData populated, and also the onFinish function does nothing (no save, no calls on the API). What am I doing wrong ?
Was this page helpful?