From ad1b1b9ceee80ba2113b582d9dd97154246b4f02 Mon Sep 17 00:00:00 2001 From: Ilya Oleshko Date: Wed, 7 Aug 2024 15:10:54 +0300 Subject: [PATCH] Fixed Bug 69580 - Rooms: Embed: Infinite loader inside embedded file with password --- packages/doceditor/src/components/file-password/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/doceditor/src/components/file-password/index.tsx b/packages/doceditor/src/components/file-password/index.tsx index 08b8ecadbf..78cf52078e 100644 --- a/packages/doceditor/src/components/file-password/index.tsx +++ b/packages/doceditor/src/components/file-password/index.tsx @@ -26,7 +26,7 @@ "use client"; -import React, { useState } from "react"; +import React, { useState, useEffect } from "react"; import { Trans, useTranslation } from "react-i18next"; import { Text } from "@docspace/shared/components/text"; @@ -49,6 +49,7 @@ import { toastr } from "@docspace/shared/components/toast"; import { TData } from "@docspace/shared/components/toast/Toast.type"; import { getLogoUrl } from "@docspace/shared/utils"; +import { frameCallCommand } from "@docspace/shared/utils/common"; import { useTheme } from "styled-components"; import { ValidationStatus, WhiteLabelLogoType } from "@docspace/shared/enums"; import { validatePublicRoomPassword } from "@docspace/shared/api/rooms"; @@ -64,6 +65,8 @@ const FilePassword = ({ shareKey, title, entryTitle }: FilePasswordProps) => { const [isLoading, setIsLoading] = useState(false); const [errorMessage, setErrorMessage] = useState(""); + useEffect(() => frameCallCommand("setIsLoaded"), []); + const onChangePassword = (e: React.ChangeEvent) => { setPassword(e.target.value); !passwordValid && setPasswordValid(true);