Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix table state returning from detail to table

Max Deichmanneefa22b1a819
diff --git a/src/components/data-table-toolbar.tsx b/src/components/data-table-toolbar.tsx
index 108e239f4b..6bf9a73a83 100644
--- a/src/components/data-table-toolbar.tsx
+++ b/src/components/data-table-toolbar.tsx
@@ -18,7 +18,10 @@ export function DataTableToolbar<TData, TValue>({
queryOptions,
updateQueryOptions,
}: DataTableToolbarProps<TData, TValue>) {
- const isFiltered = queryOptions.name !== null;
+ const isFiltered =
+ queryOptions.name !== null ||
+ queryOptions.id !== null ||
+ queryOptions.status !== null;
return (
<div className="flex items-center justify-between">
diff --git a/src/pages/traces.tsx b/src/pages/traces.tsx
index f05ac0a51b..70845ddd7c 100644
--- a/src/pages/traces.tsx
+++ b/src/pages/traces.tsx
@@ -41,19 +41,15 @@ export default function Traces() {
const [queryOptions, setQueryOptions] = useState<TraceFilterInput>({
attribute: {},
- name: [],
- id: [],
- status: [],
+ name: null,
+ id: null,
+ status: null,
});
const updateQueryOptions = (options: TraceFilterInput) => {
setQueryOptions(options);
};
- // {
- // refetchInterval: 2000,
- // }
-
const traces = api.traces.all.useQuery(queryOptions);
const options = api.traces.availableFilterOptions.useQuery(queryOptions);