The useModal hook with a ModalForm already wired up: shows the form in a modal and returns the methods to control it.
useModal
ModalForm
const { ModalWrapper, openModal } = useModalForm<Genre>({ title: 'Edit Genre', initialData: { loading, data }, saveData, children: <Field name="title" label="Title" as={SingleLineTextField} />,}); Copy
const { ModalWrapper, openModal } = useModalForm<Genre>({ title: 'Edit Genre', initialData: { loading, data }, saveData, children: <Field name="title" label="Title" as={SingleLineTextField} />,});
The
useModalhook with aModalFormalready wired up: shows the form in a modal and returns the methods to control it.