spotty-amberS
Refine3y ago
5 replies
spotty-amber

Edit page doesn't fetch and populate the form fields.

I have multi-level menu and from that menu I have and list page and edit action on list of item. But when I go to edit page the page doesn't fetch the data and populate the form field. I am confused with how the edit view work on antd.

This is my edit page code:

export const ScheduleEdit: React.FC<IResourceComponentsProps> = () => {
  const t = useTranslate();
  const {
    saveButtonProps,
    formProps,
  } = useForm<ISchedule>({
      resource: 'bo/schedules',
  });

  return (
    <Edit
        saveButtonProps={saveButtonProps}
        title="Edit Schedule"
    >

    // form fields

    </Edit>
  )
}
Was this page helpful?