mirror of
https://github.com/ansible/awx.git
synced 2026-03-09 05:29:26 -02:30
clean up follow mode quirks
This commit is contained in:
committed by
Keith J. Grant
parent
6f6f04a071
commit
03b0281fde
@@ -187,7 +187,9 @@ function JobOutput({ job, eventRelatedSearchableKeys, eventSearchableKeys }) {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const pendingRequests = Object.values(eventByUuidRequests.current || {});
|
const pendingRequests = Object.values(eventByUuidRequests.current || {});
|
||||||
setHasContentLoading(true); // prevents "no content found" screen from flashing
|
setHasContentLoading(true); // prevents "no content found" screen from flashing
|
||||||
setIsFollowModeEnabled(false);
|
if (location.search) {
|
||||||
|
setIsFollowModeEnabled(false);
|
||||||
|
}
|
||||||
Promise.allSettled(pendingRequests).then(() => {
|
Promise.allSettled(pendingRequests).then(() => {
|
||||||
setRemoteRowCount(0);
|
setRemoteRowCount(0);
|
||||||
clearLoadedEvents();
|
clearLoadedEvents();
|
||||||
@@ -635,10 +637,14 @@ function JobOutput({ job, eventRelatedSearchableKeys, eventSearchableKeys }) {
|
|||||||
setIsFollowModeEnabled(false);
|
setIsFollowModeEnabled(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const scrollToEnd = () => {
|
const scrollToEnd = useCallback(() => {
|
||||||
scrollToRow(-1);
|
scrollToRow(-1);
|
||||||
setTimeout(() => scrollToRow(-1), 100);
|
let timeout;
|
||||||
};
|
if (isFollowModeEnabled) {
|
||||||
|
setTimeout(() => scrollToRow(-1), 100);
|
||||||
|
}
|
||||||
|
return () => clearTimeout(timeout);
|
||||||
|
}, [isFollowModeEnabled]);
|
||||||
|
|
||||||
const handleScrollLast = () => {
|
const handleScrollLast = () => {
|
||||||
scrollToEnd();
|
scrollToEnd();
|
||||||
|
|||||||
Reference in New Issue
Block a user