[Lens] Wrap edit flyout in the context provider (#162017)

## Summary

This is just a small enhancement for the push flyout to edit Lens
visualizations on the fly. It doesn't change anything atm but it will be
necessary when we enable the flyout for the formbased visualizations. It
just wraps up the component to the context provider.

This was not necessary before but now is with the changes Marta did.
This commit is contained in:
Stratoula Kalafateli 2023-07-17 16:30:20 +03:00 committed by GitHub
parent 25ff25959d
commit 163d78b241
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,6 +12,7 @@ import { Provider } from 'react-redux';
import { PreloadedState } from '@reduxjs/toolkit';
import { css } from '@emotion/react';
import type { CoreStart } from '@kbn/core/public';
import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public';
import type { LensPluginStartDependencies } from '../../../plugin';
import {
makeConfigureStore,
@ -141,7 +142,9 @@ export function getEditLensConfiguration(
return getWrapper(
<Provider store={lensStore}>
<LensEditConfigurationFlyout {...configPanelProps} />
<KibanaContextProvider services={lensServices}>
<LensEditConfigurationFlyout {...configPanelProps} />
</KibanaContextProvider>
</Provider>
);
};