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

Appearance settings

Commit fa9777e

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

File tree

Expand file treeCollapse file tree

1 file changed

+7
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-5
lines changed

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

Copy file name to clipboardExpand all lines: arduino-ide-extension/src/browser/serial/monitor/serial-monitor-send-output.tsx
+7-5Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.