Skip to content

Commit

Permalink
[ML] Fixing bucket span estimator in advanced wizard (elastic#149008)
Browse files Browse the repository at this point in the history
In the advanced wizard the bucket span estimator is always disabled.
This was caused by an incorrect update check.
  • Loading branch information
jgowdyelastic authored and wayneseymour committed Jan 19, 2023
1 parent b559e93 commit 864cf1d
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -19,7 +19,7 @@ interface Props {
}

export const BucketSpanEstimator: FC<Props> = ({ setEstimating }) => {
const { jobCreator, jobCreatorUpdate } = useContext(JobCreatorContext);
const { jobCreator, jobCreatorUpdated } = useContext(JobCreatorContext);
const { status, estimateBucketSpan } = useEstimateBucketSpan();
const [noDetectors, setNoDetectors] = useState(jobCreator.detectors.length === 0);
const [isUsingMlCategory, setIsUsingMlCategory] = useState(checkIsUsingMlCategory());
Expand All @@ -33,7 +33,7 @@ export const BucketSpanEstimator: FC<Props> = ({ setEstimating }) => {
setNoDetectors(jobCreator.detectors.length === 0);
setIsUsingMlCategory(checkIsUsingMlCategory());
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [jobCreatorUpdate]);
}, [jobCreatorUpdated]);

function checkIsUsingMlCategory() {
return (
Expand Down

0 comments on commit 864cf1d

Please sign in to comment.