From eb01cb6705b6586868a70b8e3bc290cbe0a8fd0f Mon Sep 17 00:00:00 2001 From: Matias Chomicki Date: Fri, 6 Dec 2024 13:17:59 +0000 Subject: [PATCH] Logs: update panel state when clearing displayed fields (#97543) Logs: set panel state when clearing displayed fields --- public/app/features/explore/Logs/Logs.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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>(() => {});