diff --git a/x-pack/plugins/ml/public/application/components/field_stats_flyout/field_stats_flyout_provider.tsx b/x-pack/plugins/ml/public/application/components/field_stats_flyout/field_stats_flyout_provider.tsx
index f65c57cc52f2f..3d913cd26b84d 100644
--- a/x-pack/plugins/ml/public/application/components/field_stats_flyout/field_stats_flyout_provider.tsx
+++ b/x-pack/plugins/ml/public/application/components/field_stats_flyout/field_stats_flyout_provider.tsx
@@ -10,7 +10,7 @@ import type { DataView } from '@kbn/data-plugin/common';
import type { FieldStatsServices } from '@kbn/unified-field-list-plugin/public';
import type { TimeRange as TimeRangeMs } from '@kbn/ml-date-picker';
import type { FieldStatsProps } from '@kbn/unified-field-list-plugin/public';
-import { MLJobWizardFieldStatsFlyoutContext } from './use_field_stats_flytout_context';
+import { MLFieldStatsFlyoutContext } from './use_field_stats_flytout_context';
import { FieldStatsFlyout } from './field_stats_flyout';
export const FieldStatsFlyoutProvider = ({
@@ -36,7 +36,7 @@ export const FieldStatsFlyoutProvider = ({
);
return (
-
{children}
-
+
);
};
diff --git a/x-pack/plugins/ml/public/application/components/field_stats_flyout/index.ts b/x-pack/plugins/ml/public/application/components/field_stats_flyout/index.ts
index c808653bb9ff7..d844dd037bd5b 100644
--- a/x-pack/plugins/ml/public/application/components/field_stats_flyout/index.ts
+++ b/x-pack/plugins/ml/public/application/components/field_stats_flyout/index.ts
@@ -9,7 +9,7 @@ export { FieldStatsFlyout } from './field_stats_flyout';
export { FieldStatsContent } from './field_stats_content';
export { FieldStatsFlyoutProvider } from './field_stats_flyout_provider';
export {
- MLJobWizardFieldStatsFlyoutContext,
+ MLFieldStatsFlyoutContext,
useFieldStatsFlyoutContext,
} from './use_field_stats_flytout_context';
export { FieldStatsInfoButton } from './field_stats_info_button';
diff --git a/x-pack/plugins/ml/public/application/components/field_stats_flyout/use_field_stats_flytout_context.ts b/x-pack/plugins/ml/public/application/components/field_stats_flyout/use_field_stats_flytout_context.ts
index 882201a7cd9ea..2de9fda1ded17 100644
--- a/x-pack/plugins/ml/public/application/components/field_stats_flyout/use_field_stats_flytout_context.ts
+++ b/x-pack/plugins/ml/public/application/components/field_stats_flyout/use_field_stats_flytout_context.ts
@@ -15,7 +15,7 @@ interface MLJobWizardFieldStatsFlyoutProps {
setFieldValue: (v: string) => void;
fieldValue?: string | number;
}
-export const MLJobWizardFieldStatsFlyoutContext = createContext({
+export const MLFieldStatsFlyoutContext = createContext({
isFlyoutVisible: false,
setIsFlyoutVisible: () => {},
toggleFlyoutVisible: () => {},
@@ -24,5 +24,5 @@ export const MLJobWizardFieldStatsFlyoutContext = createContext = ({ currentStep, setCurrentStep }) => {
const timeRangeMs = useMemo(() => {
// If time range is available via jobCreator, use that
// else mimic Discover and set timeRange to be now for data view without time field
- return start && end ? { from: start, to: start } : undefined;
+ return start && end ? { from: start, to: end } : undefined;
}, [start, end]);
// store whether the advanced and additional sections have been expanded.