This component is the basic building block for forms shown inside a modal.
Its header actions are bound to the hosting modal instead of the router:
'Cancel' discards the changes and closes the modal, 'Save' calls saveData
and closes the modal once the data was saved. A failed save keeps the modal
open and shows the error.
Use it with the useModal hook, or with useModalForm, which combines both.
This component is the basic building block for forms shown inside a modal.
Its header actions are bound to the hosting modal instead of the router: 'Cancel' discards the changes and closes the modal, 'Save' calls
saveDataand closes the modal once the data was saved. A failed save keeps the modal open and shows the error.Use it with the
useModalhook, or withuseModalForm, which combines both.