Remove redundant confirmLeave on tracking number dialog (#1926)
* Add onBeforeUnload handler to prevent accidental refresh * Update button messages * Fix exit form not working after submit * Make onBeforeUnload disable if env is development * Fix onClose * Remove internal date time field state * Update messages and dialog * Prevent navigation on 400 error * Add submit disabled ref in exit form * Update exit form dialog for disabled save * Update confirmLeave forms to set ref if save is disabled * Remove unused error handling * Remove explicit ref type * Remove unused import * Fix disabled type * Add disable check function to generic forms * Add custom isDisabled method to sale and voucher forms * Add default isDisabled functions to confirmLeave forms * Update tests * Remove unused code * Rebase fixes + update tests * Refactor form and useform * Refactor disabling forms * Change "saveDisabled" name to "isSaveDisabled" for improved readability * Change "isDisabled" function to "checkIfSaveIsDisabled" * Remove redundant confirmLeave on tracking number dialog
This commit is contained in:
parent
74848922dc
commit
26659a0be7
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ const OrderFulfillmentTrackingDialog: React.FC<OrderFulfillmentTrackingDialogPro
|
|||
|
||||
return (
|
||||
<Dialog onClose={onClose} open={open} fullWidth maxWidth="xs">
|
||||
<Form confirmLeave initial={initialData} onSubmit={onConfirm}>
|
||||
<Form initial={initialData} onSubmit={onConfirm}>
|
||||
{({ change, data, submit }) => (
|
||||
<>
|
||||
<DialogTitle>
|
||||
|
|
Loading…
Reference in a new issue