fix(dialog,web) fix opening dialogs in succession
If onSubmit opens a new dialog, we'd be hiding it otherwise.
This commit is contained in:
parent
69f4b116a9
commit
eb59949dfa
|
@ -228,13 +228,13 @@ const Dialog = ({
|
|||
const dispatch = useDispatch();
|
||||
|
||||
const onClose = useCallback(() => {
|
||||
onCancel?.();
|
||||
dispatch(hideDialog());
|
||||
onCancel?.();
|
||||
}, [ onCancel ]);
|
||||
|
||||
const submit = useCallback(() => {
|
||||
onSubmit?.();
|
||||
dispatch(hideDialog());
|
||||
onSubmit?.();
|
||||
}, [ onSubmit ]);
|
||||
|
||||
const handleKeyDown = useCallback((e: KeyboardEvent) => {
|
||||
|
|
Loading…
Reference in New Issue