From 9f9a2ff1d9f02fcc33c0bac6ed08a0b33abe4e63 Mon Sep 17 00:00:00 2001 From: Damien de Lemeny Date: Wed, 15 May 2024 09:46:10 -0500 Subject: [PATCH] Disable lint filter in context editor --- src/LogContext/components/LogContextUI.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/LogContext/components/LogContextUI.tsx b/src/LogContext/components/LogContextUI.tsx index 92a7198..3718701 100644 --- a/src/LogContext/components/LogContextUI.tsx +++ b/src/LogContext/components/LogContextUI.tsx @@ -49,8 +49,8 @@ export interface LogContextUIProps extends LogContextProps { export function LogContextUI(props: LogContextUIProps ){ const builder = useQueryBuilder(); - const {query, parsedQuery, setQuery, setParsedQuery} = builder; - const [canRunQuery, setCanRunQuery] = useState(false); + const {query, /*parsedQuery,*/ setQuery, setParsedQuery} = builder; + const [canRunQuery, /*setCanRunQuery*/] = useState(true); const {row, origQuery, updateQuery, runContextQuery } = props; const fieldsSuggestionTimeRange = useMemo(()=>createContextTimeRange(row.timeEpochMs), [row]) @@ -60,9 +60,11 @@ export function LogContextUI(props: LogContextUIProps ){ setQuery(origQuery?.query || '') }, [setQuery, origQuery]) - useEffect(()=>{ - setCanRunQuery(!parsedQuery.parseError) - }, [parsedQuery, setCanRunQuery]) + // FIXME : query parser used for lint is not reliable enough + // to use as a filter for wrong queries. Disabled for now. + // useEffect(()=>{ + // { if (runContextQuery){