Skip to content

Commit

Permalink
Disable lint filter in context editor
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelemeny committed May 15, 2024
1 parent 6628ce2 commit 9f9a2ff
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/LogContext/components/LogContextUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<boolean>(false);
const {query, /*parsedQuery,*/ setQuery, setParsedQuery} = builder;
const [canRunQuery, /*setCanRunQuery*/] = useState<boolean>(true);
const {row, origQuery, updateQuery, runContextQuery } = props;

const fieldsSuggestionTimeRange = useMemo(()=>createContextTimeRange(row.timeEpochMs), [row])
Expand All @@ -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(()=>{
// <setCanRunQuery(!parsedQuery.parseError)
// }, [parsedQuery, setCanRunQuery])

const runQuery = useCallback(()=>{
if (runContextQuery){
Expand Down

0 comments on commit 9f9a2ff

Please sign in to comment.