Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fa9777e

Browse files
Akos Kittakittaakos
Akos Kitta
authored andcommitted
fix: scroll to the bottom after the state update
Closes #1736 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
1 parent 7721350 commit fa9777e

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

‎arduino-ide-extension/src/browser/serial/monitor/serial-monitor-send-output.tsx‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,13 @@ export class SerialMonitorOutput extends React.Component<
6565
this.state.charCount
6666
);
6767
const [lines, charCount] = truncateLines(newLines, totalCharCount);
68-
this.setState({
69-
lines,
70-
charCount,
71-
});
72-
this.scrollToBottom();
68+
this.setState(
69+
{
70+
lines,
71+
charCount,
72+
},
73+
() => this.scrollToBottom()
74+
);
7375
}),
7476
this.props.clearConsoleEvent(() =>
7577
this.setState({ lines: [], charCount: 0 })

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /