Fix Bug - Files. Create folder with dialog

This commit is contained in:
Elyor Djalilov 2023-01-30 17:56:07 +05:00
parent 99ab71fb34
commit 6dc710be0a
2 changed files with 10 additions and 4 deletions

View File

@ -75,6 +75,8 @@ const CreateEvent = ({
setHeaderTitle(defaultName);
if (!extension) return setEventDialogVisible(true);
if (!createWithoutDialog) {
setEventDialogVisible(true);
} else {
@ -272,6 +274,7 @@ const CreateEvent = ({
onCancel={onCancel}
onClose={onCloseAction}
isCreateDialog={true}
extension={extension}
/>
);
};

View File

@ -24,6 +24,7 @@ const Dialog = ({
isCreateDialog,
createWithoutDialog,
setCreateWithoutDialog,
extension,
}) => {
const [value, setValue] = useState("");
const [isDisabled, setIsDisabled] = useState(false);
@ -86,16 +87,18 @@ const Dialog = ({
);
const onCancelAction = useCallback((e) => {
if (isChecked) {
setCreateWithoutDialog(false);
}
onCancel && onCancel(e);
setCreateWithoutDialog(false);
}, []);
const onCloseAction = useCallback(
(e) => {
if (!isDisabled) {
onClose && onClose(e);
if (!isDisabled && isChecked) {
setCreateWithoutDialog(false);
}
onClose && onClose(e);
},
[isDisabled]
);
@ -125,7 +128,7 @@ const Dialog = ({
onFocus={onFocus}
isDisabled={isDisabled}
/>
{isCreateDialog && (
{isCreateDialog && extension && (
<Box displayProp="flex" alignItems="center" paddingProp="16px 0 0">
<Checkbox
label={t("Common:DontAskAgain")}