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 ad3469e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/LogContext/components/LogContextUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ 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 [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 ad3469e

Please sign in to comment.