mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-19 00:01:29 +00:00
revert(ui): remove VirtualKeysTable useMemo fix from credential fix branch
Already covered by fix/virtual-keys-infinite-rerender. Keep credential fix PR scope focused on the stale credential list bug only. Co-Authored-By: Claude Sonnet 4 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
32d93bb0ea
commit
0a7fc610ee
1 changed files with 2 additions and 6 deletions
|
|
@ -94,15 +94,11 @@ export function VirtualKeysTable({ teams, organizations, onSortChange, currentSo
|
|||
});
|
||||
const [expandedAccordions, setExpandedAccordions] = useState<Record<string, boolean>>({});
|
||||
|
||||
// Stabilize the keys array reference so that useFilterLogic's useEffect
|
||||
// (which depends on `keys`) only fires when the actual data changes, not on
|
||||
// every render caused by setFilteredKeys → re-render → new [] literal.
|
||||
const stableKeys = useMemo(() => keys?.keys ?? [], [keys]);
|
||||
|
||||
// Use the filter logic hook
|
||||
|
||||
const { filters, filteredKeys, filteredTotalCount, allTeams, allOrganizations, handleFilterChange, handleFilterReset } =
|
||||
useFilterLogic({
|
||||
keys: stableKeys,
|
||||
keys: keys?.keys || [],
|
||||
teams,
|
||||
organizations,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue