diff --git a/public/app/features/explore/Logs/Logs.tsx b/public/app/features/explore/Logs/Logs.tsx index eac545e4a5d..86b4dd43a1f 100644 --- a/public/app/features/explore/Logs/Logs.tsx +++ b/public/app/features/explore/Logs/Logs.tsx @@ -625,8 +625,12 @@ const UnthemedLogs: React.FunctionComponent = (props: Props) => { ); const clearDetectedFields = useCallback(() => { + updatePanelState({ + ...panelState?.logs, + displayedFields: [], + }); setDisplayedFields([]); - }, []); + }, [panelState?.logs, updatePanelState]); const onCloseCallbackRef = useRef<() => void>(() => {});