Skip to content

Commit

Permalink
if
Browse files Browse the repository at this point in the history
  • Loading branch information
Liza K committed Feb 3, 2020
1 parent ea03405 commit 35f7a91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/data/public/ui/search_bar/create_search_bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,15 @@ export function createSearchBar({ core, storage, data }: StatefulSearchBarDeps)

// Fire onQuerySubmit on query or timerange change
useEffect(() => {
if (onQuerySubmit)
if (props.useDefaultBehaviors && onQuerySubmit)
onQuerySubmit(
{
dateRange: timeRange,
query,
},
true
);
}, [onQuerySubmit, query, timeRange]);
}, [onQuerySubmit, props.useDefaultBehaviors, query, timeRange]);

// Handle saved queries
const [savedQuery, setSavedQuery] = useState<SavedQuery>();
Expand Down

0 comments on commit 35f7a91

Please sign in to comment.