Skip to content

Commit d6cb024

Browse files
committed
fix: trim badge values
1 parent 6328916 commit d6cb024

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

apps/playground-web/src/app/insight/[blueprint_slug]/aggregate-parameter-input.client.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,14 @@ export function AggregateParameterInput(props: AggregateParameterInputProps) {
157157

158158
const selectedValues = useMemo(() => {
159159
if (!value) return [];
160-
return String(value).split(",").filter(Boolean);
160+
return Array.from(
161+
new Set(
162+
String(value)
163+
.split(',')
164+
.map((v) => v.trim()) // remove leading / trailing spaces
165+
.filter(Boolean)
166+
)
167+
);
161168
}, [value]);
162169

163170
const handlePresetChange = useCallback(

0 commit comments

Comments
 (0)