mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
ee91d0fdce
commit
6a8d1d565e
1 changed files with 8 additions and 1 deletions
|
@ -124,8 +124,9 @@ export const Page: FC = () => {
|
|||
ML_PAGES.DATA_VISUALIZER_INDEX_VIEWER,
|
||||
restorableDefaults
|
||||
);
|
||||
const [currentSavedSearch, setCurrentSavedSearch] = useState(mlContext.currentSavedSearch);
|
||||
|
||||
const { combinedQuery, currentIndexPattern, currentSavedSearch, kibanaConfig } = mlContext;
|
||||
const { combinedQuery, currentIndexPattern, kibanaConfig } = mlContext;
|
||||
const timefilter = useTimefilter({
|
||||
timeRangeSelector: currentIndexPattern.timeFieldName !== undefined,
|
||||
autoRefreshSelector: true,
|
||||
|
@ -193,6 +194,12 @@ export const Page: FC = () => {
|
|||
searchString: Query['query'];
|
||||
queryLanguage: SearchQueryLanguage;
|
||||
}) => {
|
||||
// When the user loads saved search and then clear or modify the query
|
||||
// we should remove the saved search and replace it with the index pattern id
|
||||
if (currentSavedSearch !== null) {
|
||||
setCurrentSavedSearch(null);
|
||||
}
|
||||
|
||||
setDataVisualizerListState({
|
||||
...dataVisualizerListState,
|
||||
searchQuery: searchParams.searchQuery,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue