Skip to content

Commit 49e61bb

Browse files
committed
StatsHouse UI: fix promql editor empty value
1 parent 2ab45ff commit 49e61bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

statshouse-ui/src/components/UI/PromQLEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export function PromQLEditor({ value = '', onChange, className }: PromQLEditorPr
8989
}, [onChange]);
9090

9191
useEffect(() => {
92-
if (editor.current?.state.doc.toString() !== state.doc.toString()) {
92+
if (editor.current?.state.doc.toString() !== state.doc.toString() || state.doc.toString() === '') {
9393
editor.current?.setState(state);
9494
}
9595
}, [state, value]);

0 commit comments

Comments
 (0)