Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix(ui): restore log filter loading indicator (#28282)

ryan-crabbe-berri2eeca2d096c1
diff --git a/ui/litellm-dashboard/src/components/view_logs/index.tsx b/ui/litellm-dashboard/src/components/view_logs/index.tsx
index 03d917cd923..6c5fd03f0a0 100644
--- a/ui/litellm-dashboard/src/components/view_logs/index.tsx
+++ b/ui/litellm-dashboard/src/components/view_logs/index.tsx
@@ -208,6 +208,8 @@ export default function SpendLogsTable({ accessToken, token, userRole, userID, p
const deferredData = useDeferredValue(filteredData);
const isStale = deferredData !== filteredData;
const isButtonLoading = logsQuery.isFetching || isStale;
+ const isRefiltering = logsQuery.isPlaceholderData;
+ const isLogsLoading = logsQuery.isLoading || isRefiltering;
if (!accessToken || !token || !userRole || !userID) {
return (
@@ -277,7 +279,7 @@ export default function SpendLogsTable({ accessToken, token, userRole, userID, p
currentPage={currentPage}
onCurrentPageChange={setCurrentPage}
pageSize={pageSize}
- isLoading={logsQuery.isLoading}
+ isLoading={isLogsLoading}
isButtonLoading={isButtonLoading}
onRefetch={() => logsQuery.refetch()}
filteredLogs={filteredLogs}
@@ -286,7 +288,7 @@ export default function SpendLogsTable({ accessToken, token, userRole, userID, p
columns={columns}
data={deferredData}
onRowClick={handleRowClick}
- isLoading={logsQuery.isLoading}
+ isLoading={isLogsLoading}
/>
</div>
</>