mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-08 11:56:36 +00:00
fix: scroll to the bottom after the state update
Closes #1736 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
parent
77213507fb
commit
fa9777e529
@ -65,11 +65,13 @@ export class SerialMonitorOutput extends React.Component<
|
|||||||
this.state.charCount
|
this.state.charCount
|
||||||
);
|
);
|
||||||
const [lines, charCount] = truncateLines(newLines, totalCharCount);
|
const [lines, charCount] = truncateLines(newLines, totalCharCount);
|
||||||
this.setState({
|
this.setState(
|
||||||
|
{
|
||||||
lines,
|
lines,
|
||||||
charCount,
|
charCount,
|
||||||
});
|
},
|
||||||
this.scrollToBottom();
|
() => this.scrollToBottom()
|
||||||
|
);
|
||||||
}),
|
}),
|
||||||
this.props.clearConsoleEvent(() =>
|
this.props.clearConsoleEvent(() =>
|
||||||
this.setState({ lines: [], charCount: 0 })
|
this.setState({ lines: [], charCount: 0 })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user