From 0a1b97eca979a30c3948313a24d95dc74e9b5eaa Mon Sep 17 00:00:00 2001 From: Tzipi-kaltura Date: Thu, 10 Oct 2024 12:31:55 +0300 Subject: [PATCH] move the displayFirst check into th first condition --- src/components/download-item/download-item.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/download-item/download-item.tsx b/src/components/download-item/download-item.tsx index d84a516..425a537 100644 --- a/src/components/download-item/download-item.tsx +++ b/src/components/download-item/download-item.tsx @@ -53,9 +53,7 @@ export const DownloadItem = withText({ const downloadItemRef = useRef(null); useEffect(() => { - if (isDefault) { - downloadItemRef.current?.focus(); - } else if (displayFirst) { + if (isDefault || displayFirst) { downloadItemRef.current?.focus(); } }, []);