overflow: 'auto',
backgroundColor: '#000',
height: `calc(100% - ${theme.spacing.unit * 4}px)`, // so that horizontal scollbar is visible
+ "& a": {
+ color: theme.palette.primary.main,
+ },
},
logText: {
padding: theme.spacing.unit * 0.5,
export const ProcessLogCodeSnippet = withStyles(styles)(connect()(
({classes, lines, fontSize, dispatch, wordWrap}: ProcessLogCodeSnippetProps & WithStyles<CssRules> & DispatchProp) => {
- const [followMode, setFollowMode] = useState<boolean>(false);
+ const [followMode, setFollowMode] = useState<boolean>(true);
const scrollRef = useRef<HTMLDivElement>(null);
useEffect(() => {
<div ref={scrollRef} className={classes.root}
onScroll={(e) => {
const elem = e.target as HTMLDivElement;
- if (elem.scrollTop + elem.clientHeight >= elem.scrollHeight) {
+ if (elem.scrollTop + (elem.clientHeight*1.1) >= elem.scrollHeight) {
setFollowMode(true);
} else {
setFollowMode(false);