[8.6] [Synthetics] monitor details - last test run - step screenshot - fix slider by providing missing dep (#146617) (#146635)

# Backport

This will backport the following commits from `main` to `8.6`:
- [[Synthetics] monitor details - last test run - step screenshot - fix
slider by providing missing dep
(#146617)](https://github.com/elastic/kibana/pull/146617)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Dominique
Clarke","email":"dominique.clarke@elastic.co"},"sourceCommit":{"committedDate":"2022-11-29T21:43:27Z","message":"[Synthetics]
monitor details - last test run - step screenshot - fix slider by
providing missing dep (#146617)\n\nResolves
https://github.com/elastic/kibana/issues/143669\r\n\r\nProvides missing
dep to `useFetcher`. \r\n\r\nThe missing dep was causing the data for
the screenshot step to\r\nsometimes return
null.","sha":"fefe3aaffb36462c9dd69a4f6a0b0b2399ddd3a5","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Team:uptime","release_note:skip","v8.6.0","v8.7.0"],"number":146617,"url":"https://github.com/elastic/kibana/pull/146617","mergeCommit":{"message":"[Synthetics]
monitor details - last test run - step screenshot - fix slider by
providing missing dep (#146617)\n\nResolves
https://github.com/elastic/kibana/issues/143669\r\n\r\nProvides missing
dep to `useFetcher`. \r\n\r\nThe missing dep was causing the data for
the screenshot step to\r\nsometimes return
null.","sha":"fefe3aaffb36462c9dd69a4f6a0b0b2399ddd3a5"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/146617","number":146617,"mergeCommit":{"message":"[Synthetics]
monitor details - last test run - step screenshot - fix slider by
providing missing dep (#146617)\n\nResolves
https://github.com/elastic/kibana/issues/143669\r\n\r\nProvides missing
dep to `useFetcher`. \r\n\r\nThe missing dep was causing the data for
the screenshot step to\r\nsometimes return
null.","sha":"fefe3aaffb36462c9dd69a4f6a0b0b2399ddd3a5"}}]}] BACKPORT-->

Co-authored-by: Dominique Clarke <dominique.clarke@elastic.co>
This commit is contained in:
Kibana Machine 2022-11-29 17:51:06 -05:00 committed by GitHub
parent 5da3891b68
commit ed157d3a73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -81,7 +81,7 @@ export const useRetrieveStepImage = ({
} else {
return new Promise<ImageResponse>((resolve) => resolve(null));
}
}, [skippedStep, hasIntersected, imgPath, retryFetchOnRevisit]);
}, [skippedStep, hasIntersected, imgPath, retryFetchOnRevisit, hasImage]);
return imgState[imgPath] ?? { data: null, loading: false };
};