Skip to content

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

style: add comment on filter state (#729)

Max Deichmann66ac59585074
diff --git a/src/features/filters/hooks/useFilterState.ts b/src/features/filters/hooks/useFilterState.ts
index ec3c769839..92831d0721 100644
--- a/src/features/filters/hooks/useFilterState.ts
+++ b/src/features/filters/hooks/useFilterState.ts
@@ -10,6 +10,9 @@ import {
const DEBUG_QUERY_STATE = true;
+// encode/decode filter state
+// The decode has to return null or undefined so that withDefault will use the default value.
+// An empty array will be interpreted as existing state and hence the default value will not be used.
const CommaArrayParam = {
encode: (value: FilterState) =>
encodeDelimitedArray(