Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: scroll to the bottom after the state update
Closes #1736 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
  • Loading branch information
Akos Kitta committed Mar 3, 2023
commit ff1ddea240da7663381f66a6af0aad098d823938
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,13 @@ export class SerialMonitorOutput extends React.Component<
this.state.charCount
);
const [lines, charCount] = truncateLines(newLines, totalCharCount);
this.setState({
lines,
charCount,
});
this.scrollToBottom();
this.setState(
{
lines,
charCount,
},
() => this.scrollToBottom()
);
}),
this.props.clearConsoleEvent(() =>
this.setState({ lines: [], charCount: 0 })
Expand Down