diff --git a/public/app/plugins/datasource/tempo/QueryEditor/NativeSearch.tsx b/public/app/plugins/datasource/tempo/QueryEditor/NativeSearch.tsx index 6d8a1fb7c88..79703c2e7e0 100644 --- a/public/app/plugins/datasource/tempo/QueryEditor/NativeSearch.tsx +++ b/public/app/plugins/datasource/tempo/QueryEditor/NativeSearch.tsx @@ -160,12 +160,15 @@ const NativeSearch = ({ datasource, query, onChange, onBlur, onRunQuery }: Props } }; - const handleOnChange = useCallback((value) => { - onChange({ - ...query, - search: value, - }); - }, []); // eslint-disable-line + const handleOnChange = useCallback( + (value) => { + onChange({ + ...query, + search: value, + }); + }, + [onChange, query] + ); const templateSrv: TemplateSrv = getTemplateSrv();