[VisEditors] Replace deprecated syncQueryStateWithUrl -> syncGlobalQueryStateWithUrl (#138267)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Alexey Antonov 2022-08-09 12:14:35 +03:00 committed by GitHub
parent b864928c52
commit b2cb329ce7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -12,7 +12,7 @@ import { Route, Switch, useLocation } from 'react-router-dom';
import { EuiLoadingSpinner } from '@elastic/eui';
import { AppMountParameters, CoreStart } from '@kbn/core/public';
import type { DataViewEditorStart } from '@kbn/data-view-editor-plugin/public';
import { syncQueryStateWithUrl } from '@kbn/data-plugin/public';
import { syncGlobalQueryStateWithUrl } from '@kbn/data-plugin/public';
import { useKibana } from '@kbn/kibana-react-plugin/public';
import {
AnalyticsNoDataPageKibanaProvider,
@ -78,7 +78,7 @@ export const VisualizeApp = ({ onAppLeave }: VisualizeAppProps) => {
useEffect(() => {
// syncs `_g` portion of url with query services
const { stop } = syncQueryStateWithUrl(query, kbnUrlStateStorage);
const { stop } = syncGlobalQueryStateWithUrl(query, kbnUrlStateStorage);
return () => stop();

View file

@ -28,7 +28,7 @@ import { ACTION_VISUALIZE_LENS_FIELD } from '@kbn/ui-actions-plugin/public';
import { ACTION_CONVERT_TO_LENS } from '@kbn/visualizations-plugin/public';
import { KibanaContextProvider, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public';
import { EuiLoadingSpinner } from '@elastic/eui';
import { syncQueryStateWithUrl } from '@kbn/data-plugin/public';
import { syncGlobalQueryStateWithUrl } from '@kbn/data-plugin/public';
import { App } from './app';
import { EditorFrameStart, LensTopNavMenuEntryGenerator } from '../types';
@ -234,7 +234,7 @@ export async function mountApp(
useHash: lensServices.uiSettings.get('state:storeInSessionStorage'),
...withNotifyOnErrors(lensServices.notifications.toasts),
});
const { stop: stopSyncingQueryServiceStateWithUrl } = syncQueryStateWithUrl(
const { stop: stopSyncingQueryServiceStateWithUrl } = syncGlobalQueryStateWithUrl(
data.query,
kbnUrlStateStorage
);