From a7881a9bdd3d3a4bdc411f985373f983292dac77 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Tue, 22 Apr 2025 21:49:25 -0700 Subject: [PATCH] fix: fix linting error --- .../src/components/view_users/table.tsx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ui/litellm-dashboard/src/components/view_users/table.tsx b/ui/litellm-dashboard/src/components/view_users/table.tsx index 7f4a4d7ea9..7674a6491f 100644 --- a/ui/litellm-dashboard/src/components/view_users/table.tsx +++ b/ui/litellm-dashboard/src/components/view_users/table.tsx @@ -78,6 +78,16 @@ export function UserDataTable({ setSelectedUserId(null); }; + // Update local sorting state when currentSort prop changes + React.useEffect(() => { + if (currentSort) { + setSorting([{ + id: currentSort.sortBy, + desc: currentSort.sortOrder === 'desc' + }]); + } + }, [currentSort]); + if (selectedUserId) { return ( { - if (currentSort) { - setSorting([{ - id: currentSort.sortBy, - desc: currentSort.sortOrder === 'desc' - }]); - } - }, [currentSort]); - return (