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 ?
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 ?
