[ML] Fixing bucket span estimator in advanced wizard (#149008)

In the advanced wizard the bucket span estimator is always disabled.
This was caused by an incorrect update check.
This commit is contained in:
James Gowdy 2023-01-19 11:17:53 +00:00 committed by GitHub
parent c76e499c3c
commit 1af7e3626b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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());
@ -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 (