Web:Client: disable close dialog for create and edit room while reuqest is running
This commit is contained in:
parent
f15e708979
commit
5921cf1e1c
@ -88,6 +88,8 @@ const CreateRoomDialog = ({
|
||||
};
|
||||
|
||||
const onCloseAndDisconnectThirdparty = async () => {
|
||||
if (isLoading) return;
|
||||
|
||||
if (!!roomParams.storageLocation.thirdpartyAccount) {
|
||||
setIsLoading(true);
|
||||
await deleteThirdParty(
|
||||
@ -148,6 +150,7 @@ const CreateRoomDialog = ({
|
||||
label={t("Common:CancelButton")}
|
||||
size="normal"
|
||||
scale
|
||||
isDisabled={isLoading}
|
||||
onClick={onCloseAndDisconnectThirdparty}
|
||||
/>
|
||||
</ModalDialog.Footer>
|
||||
|
@ -44,12 +44,18 @@ const EditRoomDialog = ({
|
||||
});
|
||||
}, [fetchedImage]);
|
||||
|
||||
const onCloseAction = () => {
|
||||
if (isLoading) return;
|
||||
|
||||
onClose && onClose();
|
||||
};
|
||||
|
||||
return (
|
||||
<ModalDialog
|
||||
displayType="aside"
|
||||
withBodyScroll
|
||||
visible={visible}
|
||||
onClose={onClose}
|
||||
onClose={onCloseAction}
|
||||
isScrollLocked={isScrollLocked}
|
||||
withFooterBorder
|
||||
>
|
||||
|
Loading…
Reference in New Issue
Block a user