From c12415c12d8d9760521979d87e1b4bed5495d24d Mon Sep 17 00:00:00 2001 From: Ali Garajian <50337133+ali-garajian@users.noreply.github.com> Date: Fri, 16 Jun 2023 23:01:39 +0330 Subject: [PATCH] Virtualize download/upload object list (#2889) --- .../Common/ObjectManager/ObjectManager.tsx | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/portal-ui/src/screens/Console/Common/ObjectManager/ObjectManager.tsx b/portal-ui/src/screens/Console/Common/ObjectManager/ObjectManager.tsx index eb1923af8..71e338203 100644 --- a/portal-ui/src/screens/Console/Common/ObjectManager/ObjectManager.tsx +++ b/portal-ui/src/screens/Console/Common/ObjectManager/ObjectManager.tsx @@ -28,6 +28,7 @@ import { deleteFromList, } from "../../ObjectBrowser/objectBrowserSlice"; import clsx from "clsx"; +import VirtualizedList from "../VirtualizedList/VirtualizedList"; const styles = (theme: Theme) => createStyles({ @@ -66,6 +67,7 @@ const styles = (theme: Theme) => overflowX: "hidden", minHeight: 250, maxHeight: 335, + height: "100%", width: "100%", display: "flex", flexDirection: "column", @@ -98,6 +100,16 @@ const ObjectManager = ({ classes }: IObjectManager) => { const anonymousMode = useSelector( (state: AppState) => state.system.anonymousMode ); + + function renderObject(index: number) { + return ( + dispatch(deleteFromList(instanceID))} + /> + ); + } + return ( {managerOpen && ( @@ -123,15 +135,11 @@ const ObjectManager = ({ classes }: IObjectManager) => {
Downloads / Uploads
- {objects.map((object, key) => ( - - dispatch(deleteFromList(instanceID)) - } - /> - ))} +
)}