فهرست منبع

fix: close popup on lang select

ascarbek 2 سال پیش
والد
کامیت
521fe13cfb
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      frontend/appflowy_tauri/src/appflowy_app/components/_shared/LanguageSelectPopup.tsx

+ 4 - 1
frontend/appflowy_tauri/src/appflowy_app/components/_shared/LanguageSelectPopup.tsx

@@ -29,7 +29,10 @@ const supportedLanguages: { key: string; title: string }[] = [
 
 
 export const LanguageSelectPopup = ({ onClose }: { onClose: () => void }) => {
 export const LanguageSelectPopup = ({ onClose }: { onClose: () => void }) => {
   const items: IPopupItem[] = supportedLanguages.map<IPopupItem>((item) => ({
   const items: IPopupItem[] = supportedLanguages.map<IPopupItem>((item) => ({
-    onClick: () => void i18n.changeLanguage(item.key),
+    onClick: () => {
+      void i18n.changeLanguage(item.key);
+      onClose();
+    },
     title: item.title,
     title: item.title,
     icon: <></>,
     icon: <></>,
   }));
   }));