فهرست منبع

Fix terminal output disappears after switching tabs (#604)

Paweł Ciosek 1 سال پیش
والد
کامیت
b672ac3632
1فایلهای تغییر یافته به همراه9 افزوده شده و 3 حذف شده
  1. 9 3
      frontend/src/components/Workspace.tsx

+ 9 - 3
frontend/src/components/Workspace.tsx

@@ -62,9 +62,15 @@ function Workspace() {
           ))}
         </Tabs>
       </div>
-      <div className="h-full w-full p-4 bg-bg-workspace">
-        {tabData[activeTab].component}
-      </div>
+      {Object.keys(tabData).map((tab) => (
+        <div
+          className="h-full w-full p-4 bg-bg-workspace"
+          key={tab}
+          hidden={activeTab !== tab}
+        >
+          {tabData[tab as TabType].component}
+        </div>
+      ))}
     </>
   );
 }