Skip to content

Commit 45c4c47

Browse files
committed
Added del to the dependencies array
1 parent 8228f5c commit 45c4c47

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

apps/webapp/app/components/logs/LogsSearchInput.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,15 @@ export function LogsSearchInput() {
3535
}
3636
}, [text, replace, del]);
3737

38-
const handleClear = useCallback((e: React.MouseEvent<HTMLButtonElement>) => {
39-
e.preventDefault();
40-
e.stopPropagation();
41-
setText("");
42-
del(["search", "cursor", "direction"]);
43-
}, []);
38+
const handleClear = useCallback(
39+
(e: React.MouseEvent<HTMLButtonElement>) => {
40+
e.preventDefault();
41+
e.stopPropagation();
42+
setText("");
43+
del(["search", "cursor", "direction"]);
44+
},
45+
[del]
46+
);
4447

4548
return (
4649
<div className="flex items-center gap-1">

0 commit comments

Comments
 (0)