Skip to content

Commit 2614de0

Browse files
NicolappsConvex, Inc.
authored andcommitted
Add missing onCallback in DataFilters (#40640)
GitOrigin-RevId: 188e221d83e1b830fc6c81c0831b7d6645d99e63
1 parent 5b7f77b commit 2614de0

File tree

1 file changed

+6
-1
lines changed
  • npm-packages/dashboard-common/src/features/data/components/DataFilters

1 file changed

+6
-1
lines changed

npm-packages/dashboard-common/src/features/data/components/DataFilters/DataFilters.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ export function DataFilters({
118118
const { useLogDeploymentEvent } = useContext(DeploymentInfoContext);
119119
const log = useLogDeploymentEvent();
120120

121+
const onIndexError = useCallback(
122+
(idx: number, errors: string[]) => onError("index", idx, errors),
123+
[onError],
124+
);
125+
121126
return (
122127
<form
123128
className="flex w-full flex-col gap-2 rounded-t-lg border border-b-0 bg-background-secondary/50 p-2"
@@ -239,7 +244,7 @@ export function DataFilters({
239244
onChangeOrder={onChangeOrder}
240245
onChangeIndexFilter={onChangeIndexFilter}
241246
invalidFilters={invalidFilters}
242-
onError={(...args) => onError("index", ...args)}
247+
onError={onIndexError}
243248
hasInvalidFilters={hasInvalidFilters}
244249
/>
245250
{shownFilters.clauses.length > 0 && (

0 commit comments

Comments
 (0)