From 10c7af5ae29afbdabcfafcf9371e058a525bf600 Mon Sep 17 00:00:00 2001 From: nikec <43032218+niikeec@users.noreply.github.com> Date: Thu, 22 Jun 2023 09:56:34 -0400 Subject: [PATCH] [ENG-763] Fix list view categories loop (#999) Fix list view categories loop --- interface/app/$libraryId/Explorer/View/ListView.tsx | 2 +- interface/app/$libraryId/overview/index.tsx | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/interface/app/$libraryId/Explorer/View/ListView.tsx b/interface/app/$libraryId/Explorer/View/ListView.tsx index ba6f1dd61..ab6bff8e1 100644 --- a/interface/app/$libraryId/Explorer/View/ListView.tsx +++ b/interface/app/$libraryId/Explorer/View/ListView.tsx @@ -240,7 +240,7 @@ export default () => { }); const tableLength = table.getTotalSize(); - const { rows } = table.getRowModel(); + const rows = useMemo(() => table.getRowModel().rows, [explorerView.items]); const rowVirtualizer = useVirtualizer({ count: explorerView.items ? rows.length : 100, diff --git a/interface/app/$libraryId/overview/index.tsx b/interface/app/$libraryId/overview/index.tsx index 3dd236b19..83bd121bd 100644 --- a/interface/app/$libraryId/overview/index.tsx +++ b/interface/app/$libraryId/overview/index.tsx @@ -40,11 +40,7 @@ export const Component = () => { f.toolTipLabel !== 'List view'), - explorerToolOptions, - explorerControlOptions - ]} + options={[explorerViewOptions, explorerToolOptions, explorerControlOptions]} /> } />